on RowDataBound you can use this code for different type of rows.
protected void gvDetail_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.BackColor = System.Drawing.Color.BurlyWood;
}
if ((e.Row.RowType == DataControlRowType.DataRow))
{
if (e.Row.RowState == (DataControlRowState.Alternate))
{
e.Row.BackColor = System.Drawing.Color.LightBlue;
}
if (e.Row.RowState == (DataControlRowState.Edit))
{
e.Row.BackColor = System.Drawing.Color.Red;
}
if (e.Row.RowState == (DataControlRowState.Selected))
{
e.Row.BackColor = System.Drawing.Color.Blue;
}
if (e.Row.RowState == (DataControlRowState.Normal))
{
e.Row.BackColor = System.Drawing.Color.Coral;
}
}
}