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.
Hi,
I am using GGC with nested tables.
I want to expand/collapse nested table records on button click.
What is property to do the same..?
Thanks,
Prathima
ADAdministrator Syncfusion Team September 28, 2005 10:38 AM UTC
Hi Prathima
You can use the following code to expand and collapse the nested table records.
To Expand
this.gridGroupingControl1.Table.ExpandAllRecords();
To Collapse
this.gridGroupingControl1.Table.CollapseAllRecords();
To Expand a selected record
this.gridGroupingControl1.Table.SelectedRecords[0].Record.IsExpanded = true;
Best Regards
Mouli.
PVPrathima Venkobachar September 28, 2005 11:38 AM UTC
Thanks for the reply.It works fine.
I have one more problem, If my grid has only grouping and no nested table..then also on click of this button it expands all the groups.
So I want to make a check if the grid has nested table then only it should expand all records.How can I do this check..?
I tried with HasChildren property..it is returning true even though the grid doesn''t have any nested table.
Thanks,
Prathima
ADAdministrator Syncfusion Team September 28, 2005 02:43 PM UTC
Hi Prathima ,
I think that you have grouped the main table and the main table has got nested table.
The following code checks if the each record in each group has got records of nested table.
If so it expands the group as well as the nested table records for each group.
foreach(Group g in this.gridGroupingControl1.Table.TopLevelGroup.Groups)
foreach(Record r in g.Records)
if( r.NestedTables[0].ChildTable.Records.Count > 0)
g.IsExpanded = true;
r.IsExpanded = true;
}
Best Regards
Mouli