I am having difficulty setting an empty TextBox to null on an nullable DB Field.
XAML
<y:TextBox Text="{Binding Year1Cost, Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged,
NotifyOnValidationError=True,
ValidatesOnDataErrors=True,
ValidatesOnExceptions=True,
StringFormat=\{0:c\}}" Grid.Row="3" Grid.Column="1" />
When I enter any value into it the binding is fine and the entered value is passed
When I leave a null value alone a null is passed
If I delete the value from the TextBox the value passed is the Original value of the Textbox and the UI is not notified of the change Grrrrrrrrrrrrrrrr
I have spent a long time checking out options nothing short of putting code behind the OnTextChanged of every nullable field I cannot see the efficiency in doing this.
Thanks in advance:
ps. Have looked at TargetNullValue to no success
Visual Studio 2008 - SP1 - .Net 3.5