How to Access the Nested Tables in GridGroupingControl

3 Jan 20202 minutes to read

You can get access to a nested table inside a record using the following code.

//Accesses a nested table.
NestedTable nestedTable = groupingGrid.Table.Records[n].NestedTables[0];

//Whereas n is the specific record that owns the nested table.
'Accesses a nested table.
Dim nestedTable As NestedTable = groupingGrid.Table.Records(n).NestedTables(0)

'Whereas n is the specific record that owns the nested table.

The NestedTable has a ChildTable property.

//Gets the child of the nested table.
ChildTable ct = nestedTable.ChildTable;
'Gets the child of the nested table.
Dim ct As ChildTable = nestedTable.ChildTable

To get access to a specific record in that child table, use the code snippet given below.

Record recordInNestedTable = ct.Records[0];
 
//or
Record recordInNestedTable = ct.FilteredRecords[0]
'Accesses the first record.
Dim recordInNestedTable As Record = ct.Records(0)

'or 
Dim recordInNestedTable As Record = ct.FilteredRecords(0)

If you need access to the TableDescriptor for a nested relation, use the code snippet given below.

//Accesses the ChildTableDescriptor.
GridTableDescriptor td = this.gridGroupingControl1.TableDescriptor.Relations[0].ChildTableDescriptor;
'Accesses the ChildTableDescriptor.
Dim td As GridTableDescriptor = Me.gridGroupingControl1.TableDescriptor.Relations(0).ChildTableDescriptor