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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the backcolor of the child row during runtime?

Thread ID:





19959 Oct 7,2004 01:15 AM UTC Oct 7,2004 09:17 AM UTC WinForms 3
Tags: Grouping
Angela Chua
Asked On October 7, 2004 01:15 AM UTC

Hi.. i have a problem with setting the back color of the child rows at runtime. I need to set according to the differnt row index of the child group. and it always seem to detect the parent group and set the back colour. How can i avoid setting the parent back color in this case? thankz

Administrator [Syncfusion]
Replied On October 7, 2004 05:04 AM UTC

Hi Angela, are you handling the QueryCellStyleInfo event? If yes, in that event you can check e.TableCellIdentity.DisplayElement. You can check DisplayElement.ParentGroup to get the group for that element. Also, e.TableCellIdentity.GroupedColumn will tell you to which grouped column this record or caption row belongs. If you need to know the record index, try Table table = e.TableCellIdentity.ParentTable; Record record = e.TableCellIdentity.ParentRecord; int recordIndex = table.Records.IndexOf(record); - or - int recordIndex = table.UnsortedRecords.IndexOf(record); Stefan

Angela Chua
Replied On October 7, 2004 06:03 AM UTC

Hi.. I''m handling the TableControlPrepareViewStyleInfo event. is it possible to handle the above here?

Administrator [Syncfusion]
Replied On October 7, 2004 09:17 AM UTC

You can cast the e.Inner.Style to a GridTableCellStyleInfo object to use the above code. ''VB Dim style As GridTableCellStyleInfo = CType(e.Inner.Style, GridTableCellStyleInfo) //C# GridTableCellStyleInfo style = (GridTableCellStyleInfo) e.Inner.Style;


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

Live Chat Icon For mobile
Live Chat Icon