Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Selecting a row that is not displayed does not scroll the grid!!!
posted

I have a WebDataGrid and in a javascript function that sellects next row. When the selected row passes the visible area of the grid  the grid does not scroll up (down).  How to force the grid to scroll to show the selected row? The selection mode is set to single row.

var grid = $find("wspltSearchRes_tmpl0_uwgResults");
if (grid == null)
    return;
var rows = grid.get_rows();
var count = rows.get_length();
if (count == 0)
   return;
// TO UNSELECT A ROW
// Remove first selected row from collection
var currentSel = grid.get_behaviors().get_selection().get_selectedRows().getItem(0);
if (currentSel != null) {
    var idx = currentSel.get_index();
    grid.get_behaviors().get_selection().get_selectedRows().remove(currentSel);
    // Select row
    grid.get_behaviors().get_selection().get_selectedRows().add(grid.get_rows().get_row(idx + 1));

....

Parents Reply Children
No Data