Articles in this section
Category / Section

How to sort the enum type column?

1 min read

By default, the enumeration column is sorted based on the enum flags. So, the display values of that column are different from the normal column sorting. When you want to sort the enumeration column based on the values displayed, you can handle it by changing the CellValueType of the column as string.


//changes the CellValueType as string of Enum column
this.gridGroupingControl1.TableDescriptor.Columns["Enum"].Appearance.AnyRecordFieldCell.CellValueType = typeof(string);



‘changes the cell value type as string of Enum column
Me.gridGroupingControl1.TableDescriptor.Columns("Enum").Appearance.AnyRecordFieldCell.CellValueType = GetType(String)


The following screenshot displays the sorting of Enum column.



Sample Links:

C#: SortEnumColumn

VB: SortEnumColumn


Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment