I want to show certain cells in my UltraWebGrid in gray and italics, based on values in other cells in the row. However, I would like to do this using a css style so that we can easily alter the appearance at individual customer sites. Is there a way on the server side to add an additional class to an individual cell?
Hello,
Please refer the sample code below :
foreach (UltraGridRow row in UltraWebGrid1.Rows)
{
foreach (UltraGridCell cell in row.Cells)
cell.Style.CustomRules = "color:red";
cell.Style.CssClass = "put here you css class";
}
In this case you can specify css classes outside of the page and apply them based on the logic you have.
Hope this helps.