You can implement custom sorting via the ColumnView.CustomColumnSort event.
Custom sorting is enabled for the specific column if its GridColumn.SortMode property is set to ColumnSortMode.Custom
.
How to change the way a devexpress grid sorts rows
-
21-04-2022 - |
Question
I have a devexpress grid control on my screen. One of the fields in the table is Room number, and is taking in a string (just in case you have room 2A or something like that). However, when I click the column header (to sort the values in either ascending or descending order), it doesn't work for all the values. There are blank spaces everywhere, strings are above a room number with 0, the whole thing is a mess. Is there a way for me to change the way the grid sorts?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow