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
close icon

How to change the background color of a row in sfDataGrid.

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.


1 Reply

SR Sivakumar R Syncfusion Team 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


Live Chat Icon For mobile
Up arrow icon