DexExpress GridView 设置前景色

StyleFormatCondition formatCondition = new StyleFormatCondition();
formatCondition.Appearance.Options.UseForeColor = true;
formatCondition.Appearance.Options.HighPriority = true;
formatCondition.ApplyToRow = true;
formatCondition.Condition = FormatConditionEnum.Expression;
formatCondition.Expression = "Quantity>30"; //根据公式表达式设置颜色
formatCondition.Appearance.ForeColor = Color.FromArgb(170, 0, 0); //颜色

this.gridView1.FormatConditions.Add(formatCondition);
最后修改:2019 年 06 月 20 日 08 : 23 AM
如果觉得我的文章对你有用,请随意赞赏

发表评论