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
get_index() function always returns 0!!!
posted

I have WebSplitter that contains in one pane a WebGrid and in the other let say an info based on the currently selected row of a grid.

I have buttons outside the splitter to move next - previous on the grid.

PROBLEM:

when the pane containing grid is collapsed the get_index() function run on the currently selected row always returns 0!!! - How to move selection on the grid and get the DataKey I need to update the "details view" pane?

 
var idx = currentSel.get_index(); // When grid is on collapsed pane it alwas returns 0
if (idx == (count - 1))
    return; // you are at the end of grid!
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
No Data
Reply Children
No Data