We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to sort a column by DisplayMember rather doing it by ValueMember?

The default behavior of the sorting method is relying on the data source for the grid and by default sorting is done based on the value members present in the data source and not based on display member. It can be achieved by adding the foreign key reference to the grid. The code for foreign key column can be added to the view of the data table so that the sort behavior can be redirected to use foreign key column linked to the combo box column when the user sorts combo box column.

We have provided the step by step procedure to implement the SortByDisplayMember functionality in GridGroupingControl. Please refer the below UG link,
http://help.syncfusion.com/windowsforms/gridgrouping/sorting#sort-by-display-member

Moreover here we have provided the simple sample. In this sample, we have explained the SortByDisplayMember by ComboBox column and comment out the process for each step.

C#

 

VB

 

Sample Links

SortByDisplayMember_c#.

SortByDisplayMember_VB.

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
6781 05/04/2016 05/04/2016 Windows Forms GridGroupingControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.