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. Image for the cookie policy date

Syncfusion.Grouping.SortColumnDescriptor

I am able to get the sort descriptors but how do I set the sort descriptors?

Dim a() As Syncfusion.Grouping.SortColumnDescriptor = Me.ggcOrders.Table.TableDescriptor.GetSortDescriptors()


3 Replies

JN Johnny Nguyen June 11, 2009 04:02 PM UTC

Basically, I want to call the same functions that are executed when I clicked on a column to sort. Is this possible? Any help would be appreciated.

Thanks


RC Rajadurai C Syncfusion Team June 13, 2009 10:14 AM UTC

Hi Johnny,

Thanks for your interest in Syncfusion Products.

1) The sort descriptors can be set through the SortedColumns property. Please refer to the following lines of code.

Me.gridGroupingControl1.DataSource = CreateTable()
Dim s1 As SortColumnDescriptor = New SortColumnDescriptor("Department")
Dim s2 As SortColumnDescriptor = New SortColumnDescriptor("StudentID")
Dim col As SortColumnDescriptor() = New SortColumnDescriptor() {s1, s2}
Me.gridGroupingControl1.TableDescriptor.SortedColumns.AddRange(col)


2) When the column header is clicked, two sorting events get triggerred, TableDescriptor.SortedColumns.Changed and TableDescriptor.SortedColumns.Changing. Through these events, the sort details of that column can be retrieved.

Regards,
Rajadurai


JN Johnny Nguyen June 15, 2009 02:18 PM UTC

Thank you so much for your help. It works!

Loader.
Live Chat Icon For mobile
Up arrow icon