0

can somebody help me, how to highlight row cell if value in column a doesn't match in column b in Devexpress VB.NET. Here is the screenshot

Aditya Vyas-Lakhan
  • 13,409
  • 16
  • 61
  • 96

1 Answers1

0

Take a look at the Conditional Formatting feature which allows you to change the appearance of individual cells or rows based on specific conditions.

I believe, the FormatConditionRuleExpression will be helpful:

Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid

Dim gridFormatRule As New GridFormatRule()
Dim formatConditionRuleExpression As New FormatConditionRuleExpression()
gridFormatRule.Column = colA
gridFormatRule.ApplyToRow = True
formatConditionRuleExpression.PredefinedName = "Red Fill, Red Text"
formatConditionRuleExpression.Expression = "[A] != [B]"
gridFormatRule.Rule = formatConditionRuleExpression
gridView1.FormatRules.Add(gridFormatRule)
DmitryG
  • 17,677
  • 1
  • 30
  • 53