How to change the color of label depending on certain values in the gridview
<p>I have a sqldatasource and gridview.</p>

<p>I have two columns:</p>

<pre><code>ID | Status
1   Closed
2   Opened
3   Waiting
</code></pre>

<p>How to change the color of the label in the view state of the gridview depeding on the value from the <code>'status'</code> column. </p>

<p>For example if the value in the cell is "<code>Closed</code>" the label color will be red , if it's <code>opened</code> then it will become green and so on.</p>

<p>I've thought about looping through all cells of the <code>status</code> column and if the cell contains a certain value the color will change. ( in row data bound event ) . But I haven't done this because I don't find this idea as a good one because of the looping part.</p>
