I have sqldatasource and gridview.
I have two columns:
ID | Status 1 Closed 2 Opened 3 Waiting
How to change the label color in the gridview view state based on the value from the 'status' column.
For example, if the value in the cell is " Closed ", the color of the label will be red; if it is opened , then it will turn green, etc.
I thought about iterating over all the cells in the status column, and if the cell contains a specific value, the color will change. (in the event associated with the row data). But I didn’t do it, because I don’t think this idea is good, because it goes in cycles.
source share