Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 25, 2010 03:19 AM by Pikesville Paesano
Aug 25, 2010 02:19 AM|LINK
I was highlighting certain rows in my gridview using code like this in the DataBound event:
if (e.Row.RowType == DataControlRowType.DataRow)
e.Row.BackColor = System.Drawing.Color.Gray;
e.Row.ForeColor = System.Drawing.Color.White;
This doesn't work anymore with the CSSFriendly adapter for Gridview. I tried changing the style of the row, but nothing shows up in the source for the page.
CSS Friendly Control Adapters GridView
Aug 25, 2010 03:19 AM|LINK
I don't think the Databound event is where I'd be doing formatting. I don't recommend logic in the aspx page, either for thaat matter.
a few articles http://softwarekeith.com/
my advice would be to use JQuery to manage the CSS via class injection