We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to refresh the row to apply conditional format style on Property change?

Platform: WPF |
Control: GridDataControl |
.NET Framework: 4.5 |
Product Version:

The GridDataControl has built-in support for conditional formatting. This feature allows you to format cells and rows based on a certain condition. This can be achieved by setting GridDataControl.ConditionalFormats property. ConditionalFormats is a collection property where you can add any number of conditions using GridDataConditionalFormat.

GridDataConditionalFormat has two properties, namely: Style, that is GridDataStyleInfo and Conditions, that is FreezableCollection of GridDataCondition. When the specified conditions are fulfilled, the given style is applied to the cell or row based on AppylStyleToColumn. If ApplyStyleToColumn is True, the style is applied to that particular cell that matches the conditions. Otherwise, the style is applied to the row.

Here, GridDataConditionlFormat is defined for “Total” column and ApplyStyleToColumn is False. So the specified style is applied to the row.



When data updates come from underlying data, the specific cells alone get refreshed in UI, for better performance reasons. So when you specify GridDataConditionalFormat for a row, the specific cells alone get refreshed, based on the style specified in GridDataConditionalFormat. You can refresh the row by setting GridDataControl.Model.RefreshWholeRow property to True, as shown in the following code snippet,



In the following screenshot, the style is applied to the row based on Total column values as specified in the GridDataConditionalFormat. When the Total column value changes at runtime, the Row is refreshed, as you have set the GridDataControl.Model.RefreshWholeRow property to True.


2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile