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

I have a flat datasource bounded to a ggc that is grouped by one column. How can I sort the ggc my the grouped caption?

Thread ID:





72273 Mar 11,2008 10:45 PM UTC Mar 19,2008 03:07 AM UTC WinForms 2
Tags: Grouping
Asked On March 11, 2008 10:45 PM UTC

I have a flat datasource bouded to a ggc that is grouped my one column. How can I sort the ggc by the grouped caption?
I think what I'm needing to do is to click on a column to perform a sort but instead sort my a different field.

Administrator [Syncfusion]
Replied On March 12, 2008 05:04 AM UTC

Hi James,

Thank you for your interest in Syncfusion Products.

If your intension is to allow sorting only for the grouped columns, this can be achieved by handling the TableControlQueryAllowSortColumn event of GridGroupingControl.
Here is the code:

this.gridGroupingControl1.TableControlQueryAllowSortColumn += new Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowSortColumnEventHandler(gridGroupingControl1_TableControlQueryAllowSortColumn);

void gridGroupingControl1_TableControlQueryAllowSortColumn(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowSortColumnEventArgs e)
if (e.Column.GetName() != "Col1")
e.AllowSort = false;


Please refer the sample in the link to illustrate this:

Kindly try this and let me know if you need further assistance.


Replied On March 19, 2008 03:07 AM UTC

This is NOT my intention.
Again, I have a flat datasource and that is grouped by a single column. That column appears in the caption row, next to the plus/minus cell. I want to be able to sort by that column


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

or the page will be automatically redirected to 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