状态字段是:archivesStatus,archivesStatus为1时,设置背景色
protected void gvInfo_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
for (int i = 0; i <= gvInfo.Rows.Count ; i++)
{
string bqred = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "archivesStatus"));
if (bqred == "1")
{
e.Row.Cells[14].BackColor = System.Drawing.Color.Green;
}
}
}
}