Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to implement conditional formatting for cells

$
0
0

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. 


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>