I am using XamCurrencyEditor as the cell editor in a template column which uses a data type of "decimal?". When the value in the cell is blanked out, the cell reverts back to the original value. I suspect the XamCurrencyEditor validation fails when the data entered is blank and instead of setting the data value behind the cell to null, it reverts back to the previous value.
How can I configure XamCurrencyEditor to allow blank input and set the underlying data value to null?
My XAML looks like:
<ig:XamGrid.Resources> <Style TargetType="{x:Type igEditors:XamCurrencyEditor}"> <EventSetter Event="GotFocus" Handler="XamCurrencyEditorGotFocus"/> <Setter Property="Mask" Value="{}{currency:-4.2}"/> <Setter Property="BorderThickness" Value="1,1,1,1" /> </Style>
Hello Gary,
As long as the property that is bound to the XamCurrencyEditor is a nullable type it should accept an empty value. I just tested this and it behaved this way. You can find my sample attached.
Can you modify my sample to reproduce your issue so I can see what is happening?
Do you still require assistance on this matter? If so can you modify my sample to reproduce your issue and send it back to me?