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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC: Sort by multiple columns

Thread ID:





68841 Oct 3,2007 10:14 AM UTC Oct 3,2007 05:03 PM UTC WinForms 1
Tags: Grouping
Patrick Cheng
Asked On October 3, 2007 10:14 AM UTC


What I want to accomplish is sorting by multiple columns. It seems that when I sort a ggc, it is only based on a specific column. That column is the column that I click the header of. I want to be able to sort based on multiple columns, one after another. Is this possible? If so, can you please provide an example?

Thank you.

haneefm [Syncfusion]
Replied On October 3, 2007 05:03 PM UTC

Hi Patrick,

By default the multi column sort by Ctrl+Left Button Mouse Click is enabled. To enable/disable the multi column sort the AllowMultiColumnSort property must be set to true/false. Below is a code.

this.gridGroupingControl1.TableOptions.AllowMultiColumnSort = false;
From code to sort several columns, you add the columns the grid.TableDescriptor.SortedColumns collection.

this.gridGroupingControl1.TableDescriptor.SortedColumns.AddRange( new SortColumnDescriptor[ ]
new SortColumnDescriptor(colName1, ListSortDirection.Ascending),
new SortColumnDescriptor(colName2, ListSortDirection.Descending),
new SortColumnDescriptor(colName3, ListSortDirection.Ascending)

Best regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon