In the InitializeRow event handler I am assigning one of four custom CSS class to the row based on each of four possible values in a particular cell. A different background color and font style are specified in each class (i.e. red and strike-through, green and italic, white and normal, yellow and bold). The font is being changed for the cells in the row, but the background color is not. These CSS classes worked perfectly (background color and font styling, both) when I apply them to a static HTML table, but not to the WebDataGrid (only font styling). Does anybody have a clue why, or what I can do to make the background color work in the grid?
Hi again,
Let me add my server code in my initializerow event to make this post more useful:
e.Row.Items(13).CssClass = "Class1"
I have to say that I spent over an hour in firebug when I had to get this done for my client and it works perfectly. I am curious what didn't work by you. !important should have overridden your datagrid.css settings.
Ed
I went back and double-checked. Using !important will override OK when that CSS class is applied to individual cells, but does not override the row color even when the CSS class is applied to the row.
Thanks for the update, Ed