Welcome to the UWP feedback portal. We’re happy you’re here! If you have feedback on how to improve the UWP, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hello,

I'm trying to set my Cell background colour dynamically using my viewmodel.

Can you help me to find what i'm doing wrong ?

My_Brush => SolidColorBrush


                    <syncfusion:GridNumericColumn 

                                                  AllowResizing="True"

                                                  Width="125"

                                                  MappingName="My_Value"

                                                  DisplayBinding="{Binding My_DisplayValue}"

                                                  ShowToolTip="True"

                                                  AllowEditing="False"

                                                  TextAlignment="Center"

                                                  AllowFiltering="False">

                        <syncfusion:GridNumericColumn.CellStyle>

                            <Style TargetType="syncfusion:GridCell">

                                <Setter Property="Background"

                                        Value="{Binding My_Brush}" />

                            </Style>

                        </syncfusion:GridNumericColumn.CellStyle>


                    </syncfusion:GridNumericColumn>


Available in WPF =>  How to set background color for cells in a column based on the cell content? | WPF - SfDataGrid (syncfusion.com)