110,538
社区成员
发帖
与我相关
我的任务
分享
for (int i = 0; i < gridView.Rows.Count; i++)
{
int a;
int b;
a = Convert.ToInt32((gridView.Rows[i].Cells[7].Controls[0] as HyperLink).Text.ToString().Trim());
b = Convert.ToInt32((gridView.Rows[i].Cells[8].Controls[0] as HyperLink).Text.ToString().Trim());
if ((a > 30 && a < 100) || (b > 30 && b < 100))
{
this.gridView.Rows[i].Cells[0].BackColor = System.Drawing.Color.Yellow;
this.gridView.Rows[i].Cells[1].BackColor = System.Drawing.Color.Yellow;
this.gridView.Rows[i].Cells[2].BackColor = System.Drawing.Color.Yellow;
this.gridView.Rows[i].Cells[3].BackColor = System.Drawing.Color.Yellow;
this.gridView.Rows[i].Cells[4].BackColor = System.Drawing.Color.Yellow;
this.gridView.Rows[i].Cells[5].BackColor = System.Drawing.Color.Yellow;
this.gridView.Rows[i].Cells[6].BackColor = System.Drawing.Color.Yellow;
this.gridView.Rows[i].Cells[7].BackColor = System.Drawing.Color.Yellow;
this.gridView.Rows[i].Cells[8].BackColor = System.Drawing.Color.Yellow;
}