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
40
How can I remove persisted selected row pointer on webdatagrid from client side?
posted

I am causing a post back of the webdatagrid (with new control parameters from my object data source) ... from the client side.

I need the first row of the new grid to be the selected row.

Using the following code, I am able to programmatically remove the selected row(s) from the previous webdatagrid result set and make the first row of my current set the selected row.


    var selectedRows = grid.get_behaviors().get_selection().get_selectedRows();
   
    for (var i = selectedRows.get_length() - 1; i >= 0; i--) {
        selectedRows.remove(selectedRows.getItem(i));
    }
   
    selectedRows.add(grid.get_rows().get_row(0));


Everything works fine, except the arrow in the navigation column of the webdatagrid ... for the previously selected row ... is still displaying. 

So now, I have 2 arrows (if the previous row was other than the first) ... one for the currently selected (and highlighted row) and one for the previously selected row.

When I do a "selectedRows.remove()", I need a way to programatically remove the persisted pointer from the grid display as well.

Parents Reply Children
No Data