- 积分
- 32
- 在线时间
- 73 小时
- 主题
- 9
- 注册时间
- 2013-6-9
- 帖子
- 50
- 最后登录
- 2020-3-9
- 帖子
- 50
- 软币
- 1509
- 在线时间
- 73 小时
- 注册时间
- 2013-6-9
|
单元格
private void ConditionsAdjustment()
{
DevExpress.XtraGrid.StyleFormatCondition cn;
cn = new DevExpress.XtraGrid.StyleFormatCondition(FormatConditionEnum.Equal, this.gridView1.Columns["STATUS"], null, "5");
cn.Appearance.BackColor = Color.YellowGreen;
this.gridView1.FormatConditions.Add(cn);
}
行
private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
{
DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
if (e.RowHandle >= 0)
{
string category = view.GetRowCellDisplayText(e.RowHandle, view.Columns["STATUS"]);
if (category == "5")
{
e.Appearance.BackColor = Color.YellowGreen;
}
}
}
|
评分
-
查看全部评分
|