Articles in this section
Category / Section

How to change the background and foreground for the selected row or cell in WinRT Grid?

1 min read

In SfDataGrid, the Background and Foreground color of the selected row or cell can be changed by using RowSelectionBrush and SelectionForegroundBrush properties respectively.

XAML

<syncfusion:SfDataGrid x:Name="sfdatagrid"
                                ItemsSource="{Binding Path=Products}" 
                                SelectionUnit="Cell" 
                                RowSelectionBrush="Red"  
                    SelectionForegroundBrush="Yellow">

 

Screenshot

Figure 1: To change the background and foreground for selected cell

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied