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 background color of a row in sfDataGrid.

Thread ID:





121328 Dec 2,2015 07:20 AM UTC Dec 2,2015 07:06 PM UTC WPF 1
Tags: SfDataGrid
Asked On December 2, 2015 07:20 AM UTC

Good Day,

Is there a way to change the background color of a row in sfDatagrid in the code behind not in xaml. When a data has the same number it has the same color.

Thank you and More power.


Sivakumar R [Syncfusion]
Replied On December 2, 2015 07:06 PM UTC

Hi Bryce,

You can apply style to SfDataGrid rows using SfDataGrid.RowStyle and SfDataGrid.RowStyleSelector properties by creating style for VirtualizingCellsControl.  Refer the below KB for more information,

Either you can use StyleSelector or change the Background property using Converter in code behind to achieve your requirement



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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