I have a datagrid which is bound to a database table. I need to change the forecolor of a row to blue depending on there is a value in one of its columns. Is there a way I can do this? I tried IValueConverter, but I presume I can use this only for one cell at a time.
<DataGrid>
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style.Triggers>
<DataTrigger Binding="{Binding SomeProperty}" Value="SomeValue" >
<Setter Property="Foreground" Value="Blue" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
</DataGrid>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With