We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to go recursively through all the detail tables and change appearances of them

Thread ID:





96261 Sep 1,2010 09:08 AM Sep 2,2010 05:11 AM Windows Forms 1
Tags: GridControl
David Mecteaux
Asked On September 1, 2010 09:08 AM


Perhaps I just didn't find it in the projects and in this forum....

I need to go through all the child tables and change their appearances. For instance I may need to toggle off their insertion row, or change their background color or make them editable or not editable. But I am having a hard time finding some example code that shows me how to do this. Could someone help?

Christopher Issac Sunder K [Syncfusion]
Replied On September 2, 2010 05:11 AM

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.


Please let me know if you have any other concerns.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.