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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the row background based on property in record?

The background of row can be changed dynamically based on any property value in record by writing style of TargetType as VirtualizingCellsControl. In the style setter the background can be changed based on property value using converter.

In the below code snippet, VirtualizingCellsControl’s background is changed based on IsChecked property in data object using converter.

XAML

 

C#

 

Sample: AutoRefresh_SingleBinding

 

If you want to change the background based on two properties in underlying data object, then you can pass the data object to converter using MultiBinding.

In the below code snippet, the row background is change based on record in CustomRowStyleMultiValueConverter.

XAML

 

C#

Sample

AutoRefresh_MultiBinding

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework: Product Version:
6646 04/14/2016 04/18/2016 WPF SfDataGrid 4.5 13.4.0.53
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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