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 }

相关文章:

  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
  • 2021-09-27
  • 2022-01-20
猜你喜欢
  • 2021-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-11-11
  • 2022-01-05
  • 2021-10-18
相关资源
相似解决方案