xmlns:sfgrid="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF"
<Style x:Key="gridRowBet" TargetType="sfgrid:VirtualizingCellsControl">
<Style.Triggers>
<DataTrigger Binding="{Binding HasBet}" Value="True">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
Hi Markus,
Thank you for contacting Syncfusion support.
We have analyzed your query and we have prepared the sample to change the Background of the row based on the CellValue by using RowStyleSelector. You
can download the sample from the below sample location
Sample location: http://www.syncfusion.com/downloads/support/forum/120151/ze/SimpleApplication_(2)-1508463314
Please refer the below UG link to get more details regarding styles-and-templates in SfDataGrid
http://docs.syncfusion.com/wpf/sfdatagrid/styles-and-templates
Please let us know if you require further assistance on this.
Thanks,
Ashok
Hi Markus,
Thank you for contacting Syncfusion support.
We have analyzed your query and we have prepared the sample to change the Background of the row based on the CellValue by using RowStyleSelector. You
can download the sample from the below sample location
Sample location: http://www.syncfusion.com/downloads/support/forum/120151/ze/SimpleApplication_(2)-1508463314
Please refer the below UG link to get more details regarding styles-and-templates in SfDataGrid
http://docs.syncfusion.com/wpf/sfdatagrid/styles-and-templates
Please let us know if you require further assistance on this.
Thanks,
Ashok
<Window. Resources> <Style x:Key="gridRowBet" TargetType="sfgrid:VirtualizingCellsControl"> <Style.Triggers> <DataTrigger Binding="{Binding HasBet}" Value="True"> <Setter Property="Background" Value="Green"/> </DataTrigger> </Style.Triggers> <Style.Resources> <Style TargetType="{x:Type TextBlock}"> <Setter Property="Foreground" Value="White" /> </Style> </Style.Resources> </Style>
<Style x:Key="gridCellBet" TargetType="syncfusion:GridCell"> <Style.Triggers> <DataTrigger Binding="{Binding HasBet}" Value="True"> <Setter Property="Background" Value="Green"/> <Setter Property="FontWeight" Value="ExtraBold" /> </DataTrigger> </Style.Triggers> <Style.Resources> <Style TargetType="{x:Type TextBlock}"> <Setter Property="Foreground" Value="White" /> </Style> </Style.Resources> </Style> |