Articles in this section
Category / Section

How to sort the Enum type column in WinForms GridGroupingControl?

2 mins 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 a 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 the Enum column.


Sort  Enum column.



Conclusion


I hope you enjoyed learning about how to sort the enum type column in WinForms GridGroupingControl.


You can refer to our WinForms GridGroupingControl’s feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms GridGroupingControl documentation to understand how to present and manipulate data.

 

For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms GridGroupingControl and other WinForms components.

 

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

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