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

Different style for child tables

Thread ID:





97148 Nov 2,2010 10:23 AM UTC Nov 8,2010 04:38 AM UTC WinForms 3
Tags: Grouping
Raul Rosenthal
Asked On November 2, 2010 10:23 AM UTC

I have a GridGrouping control that displays a three level hierarchy: a master table, a nested (child) table and another table that is child of the second.

I'm trying to color the rows differently for each table.

How can I find out which table I'm asked for in the QueryCellInfo event?


Jisha Joy [Syncfusion]
Replied On November 3, 2010 10:33 AM UTC

Hi Raul,

You could check for the child table names in QueryCellStyleInfo and se the colors accordingly. Please refer to the code:

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if(e.Style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record)
if (e.Style.TableCellIdentity.DisplayElement.ParentChildTable.Name == "MyChildTable")

e.Style.BackColor = Color.LightBlue;
else if (e.Style.TableCellIdentity.DisplayElement.ParentChildTable.Name == "MyGrandChildTable")
e.Style.BackColor = Color.Lavender;
e.Style.BackColor = Color.LawnGreen;



Raul Rosenthal
Replied On November 4, 2010 09:09 AM UTC

Hi Jisha.

Perfect, thank you.

Jisha Joy [Syncfusion]
Replied On November 8, 2010 04:38 AM UTC

Hi Raul,

Thank you for your update.



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

This page will automatically be redirected to the 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