Jump to content

Set UnimDBGrid to the left position


likemike

Recommended Posts

Hello!

I'm searching for a command, which set a UnimDBGrid to the left position. I need this, because sometimes (grid is part of a carousel) the grid displays the columns somewhere in the middle of the grid when swiping from one carousel page to another. 

Thanks

Mike

Link to comment
Share on other sites

7 minutes ago, likemike said:

I'm searching for a command, which set a UnimDBGrid to the left position. I need this, because sometimes (grid is part of a carousel) the grid displays the columns somewhere in the middle of the grid when swiping from one carousel page to another. 

Hello,

Can you please explain in more details?

Link to comment
Share on other sites

OK!

Imagine you have a carousel with 2 pages.

On the first page you have a UnimDBGrid with one column (a string which is wider than the available space). 

Now swipe to the 2nd page and back to the 1st page. Now the grid shows the end of the column (you cannot see the beginning). But I wan't that the grid shows the leftmost part of the column (because here is where the string begins).

 

Link to comment
Share on other sites

57 minutes ago, likemike said:

Imagine you have a carousel with 2 pages.

On the first page you have a UnimDBGrid with one column (a string which is wider than the available space). 

Now swipe to the 2nd page and back to the 1st page. Now the grid shows the end of the column (you cannot see the beginning). But I wan't that the grid shows the leftmost part of the column (because here is where the string begins).

Okay. Can you make a simple testcase to reproduce?

Link to comment
Share on other sites

9 hours ago, likemike said:

Unigui2.rar 33.21 kB · 0 downloads

Hello,

One possible solution:

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  UnimCarouselPage1.JSInterface.JSAddListener('activate', 'function() {'+ UnimDBGrid1.JSName +'.getScrollable().scrollTo({x: 0})}')
end;

 

Link to comment
Share on other sites

×
×
  • Create New...