ASPXGridView控件通过列值来改变行的颜色或列的颜色
2010-04-28 13:30
531 查看
//改变当前处理列的颜色 protected void ASPxGridView1_HtmlDataCellPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableDataCellEventArgs e) { if (e.DataColumn.FieldName == "LEFTMONEY") { if (float.Parse(e.CellValue.ToString()) < 0) { e.Cell.ForeColor = System.Drawing.Color.Red; } } } //改变当前处理行的颜色 protected void ASPxGridView1_HtmlRowPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e) { if (e.RowType != DevExpress.Web.ASPxGridView.GridViewRowType.Data) return; string ispick = e.GetValue("IsPromotion").ToString(); if (ispick == "1") { e.Row.ForeColor = System.Drawing.Color.Red; } }
相关文章推荐
- ASPxGridview根据条件将符合条件的行颜色改变
- Flex中通过设置fillColors样式改变ComboBox控件的填充背景颜色的例子
- asp.net GridView控件鼠标移动某行改变背景颜色(方法一)
- Flex中如何通过设置backgroundColor和backgroundAlpha改变DateChooser控件背景颜色的例子
- ASPxGridView改变列颜色
- GridView控件(七)——改变通过CheckBox选中的行的样式
- winform中GridView控件在选中一行后改变选中行的背景颜色
- ASPxGridview根据条件将符合条件的行颜色改变等
- ASPxGridview根据条件将符合条件的行颜色改变等
- ASPxGridview根据条件将符合条件的行颜色改变等
- asp.net GridView控件鼠标移动某行改变背景颜色(方法一)
- ASPxGridview根据条件将符合条件的行颜色改变
- 当鼠标移动到GridView控件上某行时,该行的颜色改变(GridView行变色)
- aspx GridView的RowDataBound中改变单元格大小,颜色,汇总等
- Qt之对话框设计——利用QPalette改变控件颜色
- 根据绑定的值的不同改变gridview里某一单元格的字体或背景颜色
- GridView中点击CheckBox选中一行来改变此行的颜色
- C#通过重写Panel改变边框颜色与宽度的方法
- ASPxGridView控件的全选Bug
- Lable 控件 -- 用代码改变要显示字体的颜色