I have added one DatagridTemplateColumn in the datagrid as below:-
<my:DataGridTemplateColumn x:Name="columnRRange" Header="{x:Static MicroResources:Resources.RRangeDiskDosage}" Width="50" >
<my:DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<TextBox Text="{Binding RRange,ValidatesOnDataErrors=True, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged}"
FontFamily="{DynamicResource DefaultFontFamily}" FontSize="{DynamicResource NormalFontSize}" Style="{DynamicResource TextboxErrorStyle}">
<TextBox.IsEnabled>
<MultiBinding Converter="{StaticResource DataGridColumnEnableConverter}">
<Binding RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=local:BreakpointsGrid}" Path="CanUserUpdateRows"/>
<Binding Path="State"/>
</MultiBinding>
</TextBox.IsEnabled>
</TextBox>
</DataTemplate>
</my:DataGridTemplateColumn.CellEditingTemplate>
<my:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding RRange}" Tag="{Binding RRange, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"
Style="{DynamicResource TextBlockErrorStyle}" FontFamily="{DynamicResource DefaultFontFamily}" FontSize="{DynamicResource NormalFontSize}"/>
</DataTemplate>
</my:DataGridTemplateColumn.CellTemplate>
</my:DataGridTemplateColumn>
Binding item({Binding RRange}) is of int type. Suppose column contain default value as 10.
When I enter some invalid text(e.g. abc in int column) it gives me error which is valid.
But when I tab out, its not displaying the error text(i.e. abc) in column. It display the red border, but display old text(i.e. value 10) in the column.
Its not user frindly. Error text should be displayed in the column so user can change it.
Please let me the changes that are required.