Posted on: 11/13/2014 1:47:30 AM | Views : 481

This is probably really easy but I am having trouble finding a solution that works.
I am trying to turn a gridview row red when a specific column value = Uncategorized.
 
Here is the code
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { string CellValue = e.Row.Cells[3].Text; if (CellValue == "Uncategorized") { e.Row.Cells[3].BackColor = System.Drawing.Color.Green; } } }

Go to the complete details ...