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!