Articles in this section
Category / Section

How to programatically sort the columns in GridGroupingControl?

1 min read

 

To sort the columns programatically in GridGroupingControl the particular column should be added into the collection of SortedColumns. Please refer the below code snippet which illustrates this:

C#

//Including the direction of sorting

this.GridGroupingControl1.TableDescriptor.SortedColumns.Add("CategoryID", System.ComponentModel.ListSortDirection.Descending);

//this.GridGroupingControl1.TableDescriptor.SortedColumns.Add("CategoryID");

VB

'Including the direction of sorting

Me.GridGroupingControl1.TableDescriptor.SortedColumns.Add("CategoryID",System.ComponentModel.ListSortDirection.Descending)

'Me.GridGroupingControl1.TableDescriptor.SortedColumns.Add("CategoryID")

Sample:

http://help.syncfusion.com/support/samples/kb/Grid.Web/6.1.0.34/GGCCodeSort/CodeSort.zip

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