I'm trying to, based on data in the row to set the css class for the row or the cell depending on value.
I'd thought I'd worked out how to go about this from a previous project ( http://forums.infragistics.com/forums/p/44928/244928.aspx#244928 ) but despite using the same code for the grid with only altered columns I can't repeat the behavior. The closest I've been able to get the WHDG to add CLASS="class" is at the table level.
How can I, consistently, set the css class for row and item levels of the grid during run time?
Hello Dotcomdist
The grid uses css selectors to do its styling. Please refer the following blog which describes in details how to style WebDataGrid . Most of the stuff works for WebHierarchicalDataGrid as well : http://forums.infragistics.com/blogs/engineering/archive/2010/08/25/webdatagrid-css-styling-guide.aspx
Hope this helps
From the link then I dont see what it is I'm doing wrong.
Column @ Index 1
InitRow Code:
protected void Report_Grid_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e) { e.Row.CssClass = "summaryRow"; e.Row.Items[1].CssClass = "summaryCell"; }
Rendered Table Output:
What is it that I'm doing incorrectly that my css class isn't rendered in code?