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.

Syncfusion.Grouping.SortColumnDescriptor

Thread ID:

Created:

Updated:

Platform:

Replies:

82394 Jun 11,2009 11:00 AM Jun 15,2009 10:18 AM Windows Forms 3
loading
Tags: GridControl
Johnny Nguyen
Asked On June 11, 2009 11:00 AM

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()


Johnny Nguyen
Replied On June 11, 2009 12:02 PM

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

Rajadurai C [Syncfusion]
Replied On June 13, 2009 06:14 AM

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

Johnny Nguyen
Replied On June 15, 2009 10:18 AM

Thank you so much for your help. It works!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;