:: Forum >>

auto scroll to a select row when virtual mode is on


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.


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
Friday, December 7, 2007
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)
Monday, December 10, 2007

This topic is archived.

Back to support forum

Forum search