The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
HAhaneefm Syncfusion Team 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.Clear(); td.SortedColumns.Add("childID", direction); } }