I have a DataGrid wich is bound to a DataTable.DefaultView. And now what i need additonaly:
I did set the ColumnError Information of the DataGridRow. So for every row in my table i have column errors and i want to display this columns with red textcolour. So the user can see this column had an error.
How can i set the cell color depending on information of the dataRow.
<Window.Resources>
<local:CellConverter x:Key="CellConverter"></local:CellConverter>
<Style TargetType="DataGridCell">
<Style.Triggers>
<DataTrigger Value="True" Binding="{Binding RelativeSource={RelativeSource Self},Converter={StaticResource CellConverter}}" >
<Setter Property="Background" Value="Red"> </Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
With this code i can do something on each DataGridCell... But i dont know which row and which cell in that row has an error because i only have that dataGridCell Object which is a bit useless
pls help