3.2.0

auto scroll to a select row when virtual mode is on

Hi,

I am facing problem in moving focus to desired row when virtual mode is on.
I've used the following way for getting the desired behavior.

obj.setCurrentColumn('0');
obj.setSelectedColumns(['0']);
obj.setSelectedRows(['200']);
obj.setCurrentRow(200);

As virtual mode is on , only 100 rows are displayed. So above mentioned code is not working for me.

I am getting desired behavior using obj.setScrollTop(100*19) where 19 px is width of a row . I am looking for a better approach.

Please suggest something.


Ritu Sharma
December 7,
If the grid is already written to the page and initialized - then setCurrentRow(200) should do it and trigger setScrollTop() automatically depending whether your current position is below or above the new one.

However if the grid is not yet on the page, then you have to call setScrollTop() explicitely, because the grid does not know yet what is row height, what is total grid height and cannot calculate the scroll amount.
Alex (ActiveWidgets)
December 10,

This topic is archived.

See also:


Back to support forum