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

Sorting on child grid

Thread ID:





62898 Jun 25,2007 02:05 PM UTC Jun 25,2007 03:52 PM UTC WinForms 1
Tags: GridControl
Asked On June 25, 2007 02:05 PM UTC


I am using GGC. I have child table created using the master detail relationship and add under is group. When i sort the Grid Column On grouping summary i want my Child table columns should also get sorted accordingly....
Please tell me how to sort the child table column on click on parent table column heading.


haneefm [Syncfusion]
Replied On June 25, 2007 03:52 PM UTC

Hi Harshad,

This can be achieved by handling a the TableControlQueryAllowSortColumn event handler and add the new sortcolumn to the child table based on the parent table. Here is a code snippet to show this.

void hierarchyGrid_TableControlQueryAllowSortColumn(object sender, GridQueryAllowSortColumnEventArgs e)
if (e.Column.Name == "parentID")
bool IsSortedColumn = e.TableControl.TableDescriptor.SortedColumns.Contains(e.Column.Name);
ListSortDirection direction = ListSortDirection.Ascending;
if (IsSortedColumn)
direction = e.TableControl.TableDescriptor.SortedColumns[e.Column.Name].SortDirection;
GridGroupingControl grid = sender as GridGroupingControl;
GridTableDescriptor td = grid.GetTableDescriptor("ChildTable");
td.SortedColumns.Add("childID", direction);

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

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