I am data binding BindingList of custom objects to one of your wonderful UltraGrid controls. The UltraGrid is configured to allow the end user to change the sort order by clicking on the column header, which is great!
When I add a new object to the BindingList, that object shows up at the bottom, how can I programmatically tell the control to re-sort the list based on what ever the sort preference is of the user?
Sam
Calling RefreshSort on the band will re-sort the entire band. If you just want to add a single row, you can re-sort the row more efficiently by calling RefreshSortPosition on the row. This will move the row to it's proper place in the sort order without re-sorting the entire list.
I use this:
band.SortedColumns.RefreshSort(false);