I am using UltraWinGrid (v10.2) with a ‘select all’ check box in the header. I also have an UltraGridFilterUIProvider attached to the grid.
The problem I am having is that it would seem that when the checkbox in the header is click (checked) that all rows within the grid are then also checked. This is regardless if they are visible or not.
In my test case I have over 16,000 records in the grid and have filtered the grid down to 11 records. Clicking the check box causes UltraGrid_BeforeCellUpdate to be called for all 16,000 records and not just the 11 visible ones. This in turn makes the grid act really slow for the 11 records that the user is trying to select. Is there a way to ensure the grid only calls UltraGrid_BeforeCellUpdate of the 11 visible records?
Within UltraGrid_BeforeCellUpdate I already have this code, but this does not help with speed.
If e.Cell.Row.IsFilteredOut Then e.Cancel = True
Hello,
The synchronization with the Header CheckBox is designed to affect all the rows within the RowsCollection without regards to whether the row is visible or filtered out. Therefore, when the checkbox is checked, the values for the filtered out rows are going to be set as well. With 16,000 records, setting the value is most likely the slowdown.
To achieve this functionality with the current codebase, you will have to handle the cell synchronization manually, by setting the HeaderCheckBoxSynchronization to None, and modifying the value of the appropriate cells in the BeforeHeaderCheckStateChanged event handler. You can access all the filtered-in rows, using the GetFilteredInNonGroupByRows() method off of the e.Rows parameter.
On a few occassions, we discussed the possibility of adding additional synchronization options to only affect the Filtered-In rows. If you would like to raise the customer demand for this functionality with our product manager, I would suggest entering a feature request.
If you require further assistance regarding this functionality, please let me know.
Thanks,
Chris