Actually the default EditType for xamNumericEditor is double. The default mask for a double is just "{double}" which defaults to having 9 integer places and the number of fraction places being determined by the NumberDecimalDigits of the culture used. If you want to register a different mask for double you can use the XamMaskedEditor.RegisterDefaultMaskForType static method. The available tokens are listed on this page - http://help.infragistics.com/Help/NetAdvantage/WPF/2008.1/CLR3.X/html/xamEditors_Masks.html.
Sorry about that. I'm a twit. :) Switching to Mask worked.
BTW: I was looking at the Masks documentation which suggested:
Obviously I need to pay more attention to the context of things. Nonetheless, this is the solution I needed. Greatly appreciated.
I came across this thread and I still can't figure out how to allow the XamNumericEditor in a XamDataGrid to allow a number more than 1,999,999,999.99... Here is what I tried with no success:
<Setter Property="Mask" Value="nnn,nnn,nnn,nnn,nnn.nn" />OR<Setter Property="Mask" Value="{}{double:15.2}" />
The 2 solution above creates a mask with the correct number of prompt char but it is still not allowing me to enter more than 10 integer digits.
Anybody has a solution that allow me to enter say 234,567,890,123,456.12 ? Thanks.
I am also looking for setting the Mask for XamNumericEditor to have more than 9 integer digits. Please let me know if anyone got the solution.
Thanks
A double is only going to support 15 digits of precision so your 17 characters (15.2) will likely loose precision. That being said I am able to enter more than 9 digits. I'm attaching the sample that I'm testing with. Please attach a modified sample that demonstrates the problem if you still have an issue.
I have the same problem. I need to allow up to 12 digits, not counting the decimals. According to your statement regarding Double, it should work, but it doesn't.
I am able to type more than 9 characters into the editor if I set the Mask accordingly, but when I press Enter or focus away from the control, the value is lost if it contains more than 9 digits. Anything up to 9 digits, and the value is preserved in the cell. I am trying XamNumericEditor, XamCurrencyEditor, XamMaskEditor, as well as different data types (double, Int64, currency, etc.)... It makes no difference.
Here is my test control, which is part of a XamDataGrid. Any help will be very appreciated:
<ig:Field Name="Dollars" > <ig:Field.Settings> <ig:FieldSettings AllowEdit="True" EditAsType="{x:Type sys:Double}"> <ig:FieldSettings.EditorStyle> <Style TargetType="{x:Type ig:XamCurrencyEditor}" > <Setter Property="Mask" Value="{}{double:12.0}" /> <Setter Property="Format" Value="C0" /> </Style> </ig:FieldSettings.EditorStyle> </ig:FieldSettings> </ig:Field.Settings> </ig:Field>