if(dg.Items[i].Cells[iRow].Text == "没完成")
{
dg.Items[i].BackColor=System.Drawing.Color.FromArgb(144,238,255);
}
if(dg.Items[i].Cells[iRow].Text == "已完成")
{
dg.Items[i].BackColor=System.Drawing.Color.LightGreen;
}
转载于:https://www.cnblogs.com/csj007523/archive/2008/07/24/1250598.html