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!
|
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!
|
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.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Glad to hear that. :)
|