Hi David,
Thank you for your interest in Syncfusion products.
#1. To toggle of the insertion behavior in the child grid, you can make use of the following code which has been exposed through check box.
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
this.gridGroupingControl1.GetTableDescriptor("MyChildTable").AllowNew = this.ChkToggle.Checked;
}
#2. To change the background color, use the below code.
this.gridGroupingControl1.GetTableDescriptor("MyChildTable").Appearance.AnyRecordFieldCell.BackColor = Color.Crimson;
#3. Toggle the editing of a child table can be achieved through the “QueryCellStyleInfo” event with the following code.
this.gridGroupingControl1.GetTable("MyChildTable").QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(Form1_QueryCellStyleInfo);
void Form1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record) // check if it is record.
{
e.Style.ReadOnly = !this.ChkEdit.Checked; // toggle the edit beahviour through check box.
}
}
Please refer the following sample which illustrates the above.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GGC_ChildFormatting1502264451.zipPlease let me know if you have any other concerns.
Regards,
Christo.