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
Post a Comment