RP
Rekha P
Syncfusion Team
July 6, 2009 07:46 AM UTC
Hi Vasili,
Thank you for your interest in Syncfusion Products.
You can customize the Grid cell text when Data is bound to a Row through RowDataBound event handler. Please refer a simple code snippet below to achieve this.
void GridGroupingControl1_RowDataBound(object sender, RowDataBoundEventArgs e)
{
////// Gets the Current Record Row Element Bound.
if (e.Element.Kind == DisplayElementKind.Record)
{
for (int i = 0; i < e.Row.Cells.Count; i++)
{
/////// Check for column name.
if (((Syncfusion.Web.UI.WebControls.Grid.Grouping.GridCell)(e.Row.Cells[i])).ColumnDescriptor.Name == "Name")
{
e.Row.Cells[i].Text = "AA " + e.Row.Cells[i].Text + " BB";
}
}
}
}
The steps followed here are,
- Get the RowDataBound event.
- Check if that Row is Grid Record row, if so Iterate the Grid cells .
- Check for column name and modify the GridCell value.
Thanks,
Rekha