asp.net - Set Background color of GridView Row during page postback -


i have grid few rows. on satisying condition, need change background color of row satifies condition. in rowdatabound event of grid, loses color during page postback. how fix issue? code so.

if (e.row.rowtype = datacontrolrowtype.datarow)     dim lblshowbreak system.web.ui.webcontrols.label = e.row.findcontrol("lblshowbreak")     dim lblisbreak system.web.ui.webcontrols.label = e.row.findcontrol("lblisbreak")      if trim(lblisbreak.text) = "y"        e.row.backcolor = system.drawing.color.black     end if end if 

i think, can mark e.row.backcolor = system.drawing.color.black in onprerender method every time. in case state saved always.


Comments

Popular posts from this blog

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

ruby on rails - Authlogic - how to make a registration and don't log in the new account? -