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?
ADAdministrator Syncfusion Team October 7, 2004 12:04 AM
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);
ACAngela ChuaOctober 7, 2004 01:03 AM
I''m handling the TableControlPrepareViewStyleInfo event. is it possible to handle the above here?
ADAdministrator Syncfusion Team October 7, 2004 04:17 AM
You can cast the e.Inner.Style to a GridTableCellStyleInfo object to use the above code.
Dim style As GridTableCellStyleInfo = CType(e.Inner.Style, GridTableCellStyleInfo)
GridTableCellStyleInfo style = (GridTableCellStyleInfo) e.Inner.Style;