I'm having some trouble with editing a gridview row's background color when Editing it.
The thing is, I am using the RowDataBound
event method to change e.Row.BackColor
based on a criteria when displaying the report( 3 different colors depending on result ). For the rows that don't fall under that criteria, a GridView's property <EditRowStyle BackColor="#999999" />
is applied upon clicking the Edit button.
However, I can't seem to find a way to change the color of those that do fall under the criteria since RowDataBound seems to be called all the time, overriding any changes I make.
Any suggestions?
write a single line in Grid RowEditing Event:
GridView1.EditRowStyle.BackColor = System.Drawing.Color.LightYellow;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With