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''m looking for sample code to iterate through the the child tables of a parent table.
If i have a parent table that has 4 child tables, i would like to know how you iterate through all the child tables.
Regards
David
ADAdministrator Syncfusion Team August 25, 2005 11:05 AM UTC
I am not sure I understand what you mean by child tables.
If you mean expanding a record and seeing multiple nested tables on the same level, then you can use the gridRecord.NestedTables collection to iterate through these child tables.
If you mean a series of heirarchical parent child tables, then you can use gridRecord.ParentChildtable.NestedTable[0].ChildTable to get at the inner level. You would have to do this recursively to see nested child tables.
//get a record
GridRecord rec = this.gridGroupingControl1.Table.Records[0] as GridRecord;
//show its child table
Console.WriteLine( rec.NestedTables[0].ChildTable.Name);
//show its grandchildtable
Console.WriteLine(rec.NestedTables[0].ChildTable.Records[0].NestedTables[0].ChildTable.Name);