Welcome Guest Search | Active Topics | Sign In | Register

DataGrid Options
PRO POTSDAM GmbH
Posted: Friday, December 18, 2020 10:17:54 AM
Rank: Advanced Member
Groups: Member

Joined: 6/17/2010
Posts: 35
I know that I don't get any more support because our license has expired. Nevertheless I would like to point out the following:
DataGrid: „ensureVisible()“ via javascript only works, if a corresponding line is selected before. In this case, however, that in large tables the selected entry just hovers over the lower edge of the screen and not higher, which would be much better for usebility.
If, for example, the attribute ClientSideOnItemSelected="grid1Selected" is activated for the Grid, "ensureVisible()" would execute the command "grid1Selected", which is not desired.
What I need is the ability to simply scroll a certain line into the window of the Grid, regardless of whether it is filled with data or not, selected or not selected before.
Thanks!
eo_support
Posted: Friday, December 18, 2020 3:21:53 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

I am not sure if I understand the issue. Can you give a step by step example? For example, something like this:

1. The Grid has 500 rows;
2. Scroll the Grid with mouse to the 200th row;
3. Call grid.getItem(300).ensureVisible();
4. The 300th item is not visible. The expected result is this item is visible;

The above sample steps describes a problem (not a real one since this is just an example). Can you try to describe your issue this way too?

Thanks!
PRO POTSDAM GmbH
Posted: Wednesday, December 23, 2020 8:50:32 AM
Rank: Advanced Member
Groups: Member

Joined: 6/17/2010
Posts: 35
My mistake was that I calculated the index of the relevant line incorrectly.
The command "grid.getSelectedItem().ensureVisible()" as well as the command "grid.getItem(index).ensureVisible()" work without problems. Thanks. Angel
eo_support
Posted: Wednesday, December 23, 2020 8:51:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Glad to hear that. :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.