Wpf MVVM and editing DatagridCell
Wpf MVVM and editing DatagridCell In an MVVM project the row of a Datagrid is bound is bound to an object OA and a column of the datagrid is bound to property PB= Code.Value of this object. Code.Value Binding="{Binding Code.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Binding="{Binding Code.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" After changing the property PB we do OnPropertyChanged("Code"); OnPropertyChanged("Code"); This seems to work all right, except that when I have edited the value PB in the cell of the datagrid and then click on another control outside the datagrid or on another row of the datagrid or also when I use the enter key, then the setter of property PB is triggered with a blank value "" . This is triggered via "external code". "" I noticed that when I ed...
