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.

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:

Created:

Updated:

Platform:

Replies:

72273 Mar 11,2008 06:45 PM Mar 18,2008 11:07 PM Windows Forms 2
loading
Tags: Grouping
James
Asked On March 11, 2008 06:45 PM

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 01:04 AM

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:
http://websamples.syncfusion.com/samples/Grid.Windows/72273/main.htm

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

Regards,
Jisha




James
Replied On March 18, 2008 11:07 PM

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


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.

;