






















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 }
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。