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

Can you do a double sort in a grid control like excel

I basically need sort one column and then that data get sorted by another column e.g.: Before Sort ID Date 3 1/1/2003 1 10/12/2005 1 12/10/2005 2 1/21/2005 After Sort: ID Date 1 12/10/2005 1 10/12/2005 2 1/21/2005 3 1/1/2003 so we sorted by ID first then date. Any help would be great.

1 Reply

AD Administrator Syncfusion Team March 2, 2005 05:49 PM UTC

Take a look at the \Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Quick Start\GridControlSort sample. It shows how you can use a custom comparer to sort a column. In your case, when you sorted the primary column, your custom comparer would check if the sort keys are equal. If so, you would then base the comparision on your secondary key.

Loader.
Live Chat Icon For mobile
Up arrow icon