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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

customizing nested tables

Thread ID:





63976 Jul 12,2007 06:22 AM UTC Jul 13,2007 03:39 PM UTC WinForms 3
Tags: GridControl
Vicko Hazdovac
Asked On July 12, 2007 06:22 AM UTC

Hi I'm wondering how can I influence the appearance of nested tables in a grid grouping control

(column header text, and visibility for instance)

So far I've only found ChildGroupOptions property but that's not enough. I need to modify every nested table individually. (I need access to every nested table's table descriptor and grid column descriptor)

I've attached an example so you can modify it.


haneefm [Syncfusion]
Replied On July 12, 2007 04:01 PM UTC

Hi Vicko,

what I need is acces to table descriptor of every nested table?
You can get the table descriptor by using the GetTableDescriptor method. Here is a code:

GridTableDescriptor td1 = gridGroupingControl1.GetTableDescriptor("Table1");
td1.Appearance.AnyRecordFieldCell.BackColor = Color.LightGoldenrodYellow;

How can I remove the "More stuff" fom visible columns?
You can use the VisibleColumns collection to remove the column in a grid. Refer the below code.

GridTableDescriptor td3 = gridGroupingControl1.GetTableDescriptor("Table3");
td3.Appearance.AnyRecordFieldCell.BackColor = Color.SeaGreen;

td3.VisibleColumns.Remove("More stuff");

How can i change the header text of "Nothin much" column?
You can change the header text of the column by using the GridColumnDescriptor.HeaderText property. Below is a code snippet

GridTableDescriptor td2 = gridGroupingControl1.GetTableDescriptor("Table2");
td2.Appearance.AnyRecordFieldCell.BackColor = Color.SkyBlue;

td2.Columns["Nothing much"].HeaderText = "ChangeHeaderText";

How can i change text of table3 caption to say "3d table"
The Group CaptionText can be customized using the TableDescriptor.ChildGroupOptions.CaptionText property (gridGroupingGrid.TableDescriptor.ChildGroupOptions.CaptionText = "{CategoryName}: {Category}";).
The QueryCellStyleInfo event can also be handled to have your own text, there check for the e.TableCellIdentity.TableCellType to be GroupCaptionCell and set the text. Kindly refer to the forum thread below for more details.


Best regards,

Vicko Hazdovac
Replied On July 13, 2007 08:42 AM UTC

This is great but I have another problem.

I can't access the table descriptor object of any nested table when assigning the data source object for the first time.

After that everything works just fine. I've attached a code snippet to show you what I mean.

I'm sure I'm doing something wrong but I just can't figure it out.

Thanks in advance.


haneefm [Syncfusion]
Replied On July 13, 2007 03:39 PM UTC

Hi Vicko,

Try Calling the ReIntialize method to refresh the grid after setting the datasource in a grid.


Best regards,


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon