The following article regarding styling WebDataGrid is recommended:
http://community.infragistics.com/blogs/engineering/archive/2010/08/25/webdatagrid-css-styling-guide.aspx
In this InitializeRow event should be used for the purpose.
protected void WebDataGrid1_InitializeRow(object sender, RowEventArgs e)
{
GridRecord row = e.Row;
if (row.Items[WebDataGrid1.Columns.FromKey("Status").Index].Text == "Approved")
row.Items[WebDataGrid1.Columns.FromKey("ClientName").Index].Text = "*" + row.Items[WebDataGrid1.Columns.FromKey("ClientName").Index].Text;
row.CssClass = altItemCssClass;
} else
row.CssClass = itemCssClass;
}
Tsvetelina,
Thank you for posting this. I have been stuck trying to move a grid from UltraWebGrid to WebDataGrid and this was certainly helpful.
I see where you are setting an entire row's CSS class. Is is possible to additionly set a cell's style on a row? Using your example above, if you set the row.cssClass = itemCssClass, can I set the 'ClientName' column to have something like say, font Bold?