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. Image for the cookie policy date

Highlight expanded rows

Hi,

There are 4 nested tables in my GCC. How i can highlight expanded rows in all the 4 tables

Thanks & Regards,
Sumudu Ekanayake 

3 Replies

MG Mohanraj Gunasekaran Syncfusion Team August 16, 2016 04:27 PM UTC

Hi Sumudu, 
 
Thanks for using Syncfusion product, 
 
In order to highlight the expanded records which are all having the nested table by handling the QueryCellStyleInfo event. Please refer the below code snippet and attached sample. 
 
Code snippet: 
void groupingGrid1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) 
    if (e.TableCellIdentity!=null
    { 
        Record r = e.TableCellIdentity.DisplayElement.GetRecord(); 
        if (r != null && r.IsExpanded && r.HasNestedTables && (e.Style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.Style.TableCellIdentity.TableCellType == GridTableCellType. AlternateRecordFieldCell)) 
        { 
            e.Style.BackColor = Color.LightBlue; 
            e.Style.TextColor = Color.White; 
        } 
    } 
} 
 
Sample link:  Hierarchy sample 
 
Regards, 
Mohanraj G. 
 



SU sumudu August 18, 2016 06:03 AM UTC

Hi Mohanraj,

Thank you very much for the update.
It's working fine.

Thanks & Regards,
Sumudu Ekanayake


MG Mohanraj Gunasekaran Syncfusion Team August 19, 2016 04:52 AM UTC

Hi Sumudu, 

Thanks for your update, 

We are glad to know that your reported problem has been resolved. Please let us know if you need any further assistance.  
 
Regards, 
Mohanraj G. 


Loader.
Live Chat Icon For mobile
Up arrow icon