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.
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:

Created:

Updated:

Platform:

Replies:

121328 Dec 2,2015 07:20 AM UTC Dec 2,2015 07:06 PM UTC WPF 1
loading
Tags: SfDataGrid
Bryceboang
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.

Regards,
Bryce

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,
https://www.syncfusion.com/kb/3176/

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

Thanks,
Sivakumar

CONFIRMATION

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.

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

;