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

How to implement conditional formatting for rows

$
0
0

The following sample demonstrates how to change the appearance of grid rows based on some condition. For example, in this tutorial you can see that the background color of grid rows is gradually changed based on the value in the second data column.

This is done by binding the Background property of a style, assigned to a row, to a color converter. This converter is represented by the ColorValueConverter class that implements the IValueConverter interface and returns a color according to the provided numerical value.

Updated:

In v14.1, we implemented this functionality out-of-the-box. Please refer to the Conditional Formatting help topic for details.

Question Comments

Added By: Fahad at: 7/9/2013 3:50:45 AM    

Is there an easy way to Style each cell ? Or we have to use DataTemplate ?

Added By: Mary Roy at: 6/5/2014 1:46:45 PM    

Your sample does not work

Added By: Michael Ch (DevExpress Support) at: 6/6/2014 12:42:08 AM    Hello Mary,

Thank you for your remark. I have corrected this sample. Please review it.

Thanks,
Michael

Added By: ArunKallingal at: 9/17/2014 5:47:31 AM    

Can I get an example project for this?

Added By: Ivan (DevExpress Support) at: 9/17/2014 11:07:39 AM    

Sure. Here are good instruction on how to download examples - How to download a project attached to a Knowledge Base article. Follow the instructions starting from the "Download and install the "Example runner"..." point.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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