Colour change in gridview
-
In my database,i set flag value...according to dat value...i want to change colur of one field in a gridview...if its flag value is 0 colourof paticular row is red...other wise it is yelllow...how to do this...send me the code.i am using(C#,asp.net 2.0)
-
In my database,i set flag value...according to dat value...i want to change colur of one field in a gridview...if its flag value is 0 colourof paticular row is red...other wise it is yelllow...how to do this...send me the code.i am using(C#,asp.net 2.0)
I think you can try the Grid_RowCreated event for changing the color of the particular row. Try this in the Grid_RowCreated event : if yourCondition then Grid.Rows(e.Row.RowIndex).BackColor = Drawing.Color.Red else Grid.Rows(e.Row.RowIndex).BackColor = Drawing.Color.Yellow end if
Sekhar :)