Try this,
if (e.Row.RowType == DataControlRowType.DataRow)
{
for (int i = 0; i < GridView1.Rows.Count; i++)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[1].Text == "Pass")
{
e.Row.BackColor = System.Drawing.Color.LightBlue;
}
else
{
e.Row.BackColor = System.Drawing.Color.Lightpink;
}
}
}
}
Hope This may Help u.