Articles in this section

How to programatically sort the columns in GridGroupingControl?

 

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 (0)
Access denied
Access denied