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
720
WebDataGrid Not Clearing Selected Rows on Re-Load
posted

Hello:

I am using WebDataGrid version 10.2.20102.2230 and have encountered an issue where the grid is not completely clearing the selected rows – even when I issue a call to clear the rows like so:

 

TheGrid.Behaviors.Selection.SelectedRows.Clear()

TheGrid.Behaviors.Selection.SelectedCells.Clear()

TheGrid.Rows.Clear()

 

I have created a user-defined control which contains three different WebDataGrid objects – each with a different number of columns. Depending on which criteria the user selects, the appropriate WebDataGrid will be loaded and the other WebDataGrid objects will be made invisible. In the user-defined control code-behind, I have created a function called LoadData that will do the following:

 

1.       Clear the selected rows from all grids.

2.       Clear the selected cells from all grids.

3.       Clear the rows from all grids.

4.       Get the data from the database.

5.       Bind the data to the appropriate grid.

6.       Make that grid visible.

 

The problem I am having is when the user changes criteria and clicks to reload the grid, the row that was previously selected still has its row selector highlighted with the pointy arrow still intact. But the whole row is not highlighted. If the user clicks on another row, that row is appropriately selected and the other row that had just its row selector highlighted returns to normal (row selector not highlighted).

 

The reason that this is important is because I am using the SelectionClientEvents-RowSelectionChanging client event to issue a manual AJAX call to update the database. If the user does not explicitly click on a row to start editing data and instead tabs to the grid and starts editing data, the row will not be selected and the RowSelectionChanging event will not fire.

 

I checked Infragistics forum post http://blogs.infragistics.com/forums/p/45975/247956.aspx and put the commands to clear the selected rows in the grid Pre-Render event but the issue still remains.

 

All grids in my user-defined control do not use AutoCrud and contain template columns. Cell Activation is enabled and necessary so that the user may tab from field to field. Single Row selection is enabled so that my manual AJAX call can be issued from the RowSelectionChanging client-side event handler.

 

Below is a snapshot of what the issue looks like. The entire row is no longer high-lighted but the row selector is still high-lighted.

 

 

The only way to get around the issue is to disable view-state and data view-state.

 

Please advise is a way exists to completely clear selected rows from a grid in the code-behind or if this is a bug.