Hello,
I have created a group during design time that will group on the column "Error". Error has two values, true and false. When the grid is initially loaded, the rows all have "Error" set to false, so they all fall under the same GroupByRow.
At some later point, a particular row's "Error" cell will have its value updated in the InitializeRow event. After that, I am expecting the updated row to appear in under a different GroupByRow, but that is not happening. All the rows stay under the initial GroupByRow no matter how their "Error" value changes.
I have tried calling Row.Refresh() using the various parameters, and I have tried Row.Update(), and even Grid.Invalidate(), but nothing is working.
Does anyone know how to trigger a refresh and cause the GroupByRows to re-evaluate?
Try calling UltraGrid.Rows.Refresh()
The grid doesn't automatically update the sort or group positon of rows when the cell value changes, becasue this might cause odd behavior for users. For example, when a user changes the value in a cell and clicks away from that cell, the row would move and the grid would scroll and the spot they clicked might not be within the same row any more.
So it's left to you, the developer to decide when to refresh.
In this case, when you set the value on the cell, you can call the RefreshSortPosition method on the row. If you want to refresh the sorting (and grouping) of the whole band, you can use the band.SortedColumns.RefreshSort() method.