改变gridview 某特定行的颜色(一)

protected void grvReportList_RowDataBound(object sender, GridViewRowEventArgs e)
{
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
          int iAuditing = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "s_state"));
          if (iAuditing == 1)
              e.Row.BackColor = Color.Yellow;
      }
}

你可能感兴趣的:(GridView)