Hello!
i have a problem. I have a WPF Datagrid (.net 4) binding with 10 columns. the last column is binding with Status. Now i want to set the row colour to green if status = 4 or red if status = 3
can somebody help me... i only found this XAML Code but this is only for one cell.
i have a problem. I have a WPF Datagrid (.net 4) binding with 10 columns. the last column is binding with Status. Now i want to set the row colour to green if status = 4 or red if status = 3
can somebody help me... i only found this XAML Code but this is only for one cell.
Code:
<DataGridTextColumn.ElementStyle>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
<Trigger Property="Text" Value="4">
<Setter Property="Background" Value="LightGreen"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGridTextColumn.ElementStyle>
Comment