protected void grdServices_RowDataBound(object sender, GridViewRowEventArgs e)
{
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if ((string.IsNullOrEmpty(e.Row.Cells[3].Text) != true) || (e.Row.Cells[3].Text != " "))
{
int result = Convert.ToInt32(e.Row.Cells[4].Text);
if (result == 1) e.Row.BackColor = System.Drawing.Color.Aqua;
if (result == 2) e.Row.BackColor = System.Drawing.Color.Peru;
if (result == 3) e.Row.BackColor = System.Drawing.Color.Azure;
if (result == 5) e.Row.BackColor = System.Drawing.Color.BlanchedAlmond;
if (result == 6) e.Row.BackColor = System.Drawing.Color.Coral;
if (result == 4) e.Row.BackColor = System.Drawing.Color.Cornsilk;
}
}
}
}
Mark as Solution if u get any help