Hi,
I am using a XamNumericEditor with masking property. Everything working fine except when I clear the XamNumericEditor it goes red and give a
"Value '' could not be converted" tooltip message. can I get rid of this message or atleast change it to a custom message.
Here's my code
<igEditors:XamNumericEditor x:Name="ValueFrequency2" Width="170" Style="{StaticResource XamNumericEditorStyle}" Height="23" Text="{Binding Frequency, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,TargetNullValue=''}" Mask="{}{double:-4.5}" AlwaysValidate="True" InvalidValueBehavior="Default" PromptChar=" " > <igEditors:XamNumericEditor.ValueConstraint> <igEditors:ValueConstraint ValidateAsType="Double" MinInclusive="1" Nullable="False" MaxInclusive="9999" /> </igEditors:XamNumericEditor.ValueConstraint> </igEditors:XamNumericEditor>
I have binded it with a non-nullable double property.
Please help.
Thanks in advance
nk
Hi Zhivko Nikolov,
Thanks a lot for your reply. I was waiting for it impatiently. :)
yes, you understood it right but I don't want that the control to shows that "value" could not be conveted error" on null value. Also don't want to change my property to nullable property.
Either it does not allow me to focus out or does not show "value" could not be conveted error" on invalid value.
Also I have noticed that after clearing value in xamNumericEditor and changing tab instantly, the invalid value error pops up 15-20 times.
I want a fix for this also.
Is this possible that the control does not let focus out at all on invalid value ?
One more thing can we show these invalid value error in tooltip rather than in messagebox.
Thank you in advance.
Regards
NK
Hello Nkaur,
Thank you for your post.
I have been looking into the sample application that you have provided and I am not completely sure that I understand your issue correctly. If this behavior is appear when you delete the value of editor, it is expected because it will return null and will try to save that in the underlying object( because you have set the binding mode to TwoWay and your object is from double instead of double? type). That I can suggest in order to be able to achieve the behavior that you are looking for is to change the type of property from your underlying data that you bind to XamNumericEditor`s value to double? . Please let me know if I am missing something from your scenario and if that is not the case, so I will investigate it further for you.
If you require any further assistance, please do not hesitate to ask.
Hey...
Anybody listening to this issue?