i’m trying to Bold a cell in the my DataGrid whenever the content of the ‘Description’ field is “Test” but for some reason it ain’t working
the code in xaml is:
<DataGrid Margin="5" AutoGenerateColumns="True" ItemsSource="{Binding Path=.}"
Name="GrtDataGrid" MaxHeight="600"
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
Grid.Row="2" Grid.ColumnSpan="3">
<DataGrid.ItemTemplate>
<DataTemplate>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=Description}" Value="Test">
<Setter Property="DataGridCell.FontWeight" Value="Bold"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</DataGrid.ItemTemplate>
</DataGrid>
what am i doing wrong ?
Try the following: