How to Set Style Properties of a Nested Table

3 Jan 20201 minute to read

This can be done using the code below.

//1. Changes the backcolor of all the record field cells in the child table.

//Gets the child table descriptor for a particular relation.
GridTableDescriptor tableDescriptor= this.gridGroupingControl1.TableDescriptor.Relations["MyChildTable"].ChildTableDescriptor;

//Sets the style properties.   
tableDescriptor.Columns["childID"].Appearance.AnyRecordFieldCell.BackColor = Color.Pink;

//2. Changes the cell property of all the record field cells in the child table.

//Gets the child table descriptor for a particular relation.
GridTableDescriptor tableDescriptor = this.gridGroupingControl1.TableDescriptor.Relations["MyChildTable"].ChildTableDescriptor;

//Sets the style properties.   
tableDescriptor.Columns["childID"].Appearance.AnyRecordFieldCell.CellType="ComboBox";
'1. Changes the backcolor of all the record field cells in the child table.

'Gets the child table descriptor for a particular relation
Dim tableDescriptor As GridTableDescriptor = Me.gridGroupingControl1.TableDescriptor.Relations("ComSal").ChildTableDescriptor

'Sets the style properties.              
tableDescriptor.Columns("Des").Appearance.AnyRecordFieldCell.BackColor = Color.Pink

'2. Changes the cell property of all the record field cells in the child table.

'Gets the child table descriptor for a particular relation.
Dim tableDescriptor As GridTableDescriptor = Me.gridGroupingControl1.TableDescriptor.Relations("ComSal").ChildTableDescriptor

'Sets the style properties.   
tableDescriptor.Columns("Des").Appearance.AnyRecordFieldCell.CellType="ComboBox"