I am using xamnumeric for numeric data.
<ig:XamNumericInput Grid.Row="0" Grid.Column="1" Mask="{}{double:7.5}" Value="{Binding UpdateSourceTrigger=PropertyChanged, Path=Price, Mode=TwoWay}" />
I am getting following error message whenever i tab out from the control after entering value.
Value is invalid. Please enter a valid value.
Second thing i want know What is exact way to clear the value of the text box.
I want to get 0 at back end if some one clear the value in text box.
currently If i enter a value and then clear it now if i click on ok button i am getting value instead of 0?
Thanks,
Its working now.
My understanding to use XamMaskInput is
1) Use value instead of Text to bind property
2) Property must be Nullable
Thanks.
Hello Hemant,
I have modified the sample you sent me, so now it works as expected. Basically I bound the XamMaskedInput’s Value Property instead of its Text Property and also make the Price of type “decimal?”, which is a nullable type.. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi,
Thanks for your reply.
I have added a simple project.
In this test project I am not getting Invalid value error but I am getting following error :
1) Add value in text box and click on button : it will show value in message box.
2) now clear the value of text box by backspace and click on button but this time again message box shows same value.
what is the correct way to binding value so that on clear of the value we will get 0 instead of old value.
Please suggest.
Thank you for your post. I have been looking into it, but I cannot be completely sure how your application is organized and how exactly did you bind to your data, so could you please send an isolated sample project, where the issue is reproduced, so I could be able to think of a possible solution for you.