AD
Administrator
Syncfusion Team
November 29, 2007 09:55 AM UTC
There are no property settings that will conditionally format caption summary cells.
But one way you can do this is use the TableControlPrepareViewStyleInfo event.
//subscribe to the event somewhere.
this.gridGroupingControl1.TableControlPrepareViewStyleInfo += new GridTableControlPrepareViewStyleInfoEventHandler(gridGroupingControl1_TableControlPrepareViewStyleInfo);
//the event code
void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if (style != null && style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell)
{
double d;
if (double.TryParse(style.Text, out d) && d > 0)
{
style.BackColor = Color.Red;
}
}
}
LG
Lorenzo Grassi
November 29, 2007 10:30 AM UTC
perfect, it's exactly what I need.
Thank you
LG