HA
haneefm
Syncfusion Team
May 16, 2007 11:21 PM UTC
Hi Jon,
If you are using a GridGroupingControl, then use TableControlDrawCellDisplayText event and set e.DisplayText there to easily control what text is drawn in the cell.
void gridGroupingControl1_TableControlDrawCellDisplayText(object sender, GridTableControlDrawCellDisplayTextEventArgs e)
{
GridTableCellStyleInfo style = (GridTableCellStyleInfo)e.Inner.Style;
if(style.TableCellIdentity.Column != null
&& style.TableCellIdentity.Column.MappingName == "ColumnName")
{
object objValue = e.Inner.Style.CellValue;
f( objValue != null
&& objValue.ToString() != string.Empty)
{
int iCellValue = int.Parse(objValue.ToString());
switch(iCellValue)
{
case 1:
e.Inner.DisplayText = "Hello";
break;
case 2:
e.Inner.DisplayText = "Goodbye";
break;
case 3:
e.Inner.DisplayText = "Ciao";
break;
}
}
}
}
Best regards,
Haneef
JP
Jon Pope
May 17, 2007 02:27 AM UTC
Thanks, that did the trick!