Hi,
I am new to the Infragistics controls and I am attempting to use XamNumericEditor to edit a numeric input field. The default value for this field comes from a database value which is a decimal. My xaml code is below.
<ig:XamNumericEditor Grid.Row="2" Grid.Column="1" Value="{Binding OrderQuantity, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, UpdateSourceTrigger=Explicit}" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4,0,0,0" Mask="{}{double:10.3}" ValidationMode="Always" />
My problem is that I am getting the following error message when I run the application: System.ArgumentException: The new assigned value: 0 is not of specified type: Double. Is there another editor I should be using if I can't bind to a decimal value when using XamNumericEditor?
Thank you.
No, I do not require any further assistance. Thank you.
Hello,
I am just checking if you require any further assistance on the matter.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your answer.
I am very glad you have manage to solve you issue.
As to your new question, in order to set a mask that can be applied on a decimal values you can use the decimal place holder (“.”). For more information regarding masks please refer to the link provided in the post above:
http://help.infragistics.com/NetAdvantage/Silverlight/2011.2/CLR4.0/?page=xamInputs_Masks.html
Please let me know if you need further assistance regarding the discussed matter.
Infragistics, Inc.
It's not an issue anymore for me since I'm using a converter in order to convert the decimal value to a double. However, I was wondering why the XamNumericEditor cannot bind to decimal values directly - it seems that XamNumericEditor can only use a double mask, not a decimal mask. Is that true?
Hello AL725,
I am checking if this is still an issue for you.
If you require any further assistance please do not hesitate to ask.