1 public void productsGridView_RowDataBound(object sender, 
 2 GridViewRowEventArgs e)
 3 {
 4  if (e.Row.RowType == DataControlRowType.DataRow) //检查是否为datarow
 5  {
 6   int num = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "Number")); //取得数据
 7   if (num == 0//0库存
 8   {
 9             e.Row.BackColor = Color.Blue; //颜色突出显示
10          }
11  }
12 }
posted on 2007-07-06 16:19  Achilles.NET  阅读(861)  评论(0编辑  收藏  举报