The following sample demonstrates how to change the appearance of grid cells in a certain column based upon some condition. For example, in this tutorial you can see that the background color of cells in the second column is gradually changed based on the value in this cell.
This is done by binding the Background property of a style, assigned to a column, to a color converter. This converter is represented by the ColorValueConverter class that implements the IValueConverter interface and returns a color based on the provided numerical value.
Update: Starting with version 14.1, there is no need to create custom styles. Instead, you can use the built-in Conditional Formatting mechanism to color cells.
Question Comments
Added By: Zhigeng Fan at: 12/7/2015 6:58:02 AM
how to do conditional formatting on all cells regardless of columns? I want to gray all cells where the value is null
Added By: Alexander Rus (DevExpress Support) at: 12/7/2015 9:58:20 AMHello Zhigeng,
To process your recent post more efficiently, I created a separate ticket on your behalf: T321646: How to apply the same formatting rule to all columns.
Thanks,
Alexander