Hi,
I have an ultraNumericEditor with an input mask like this: "9999.9999"
I also have the Appearance set to TextHAlignAsString = "Left"
I have set up these two properties that way in order to keep the text left justified whether in display mode or edit mode. If there is a better way to do this please let me know.
I am running in to an issue when I completely clear the textbox, an "InvalidMaskedEditorValueException" is thrown. I am thinking it has something to do with the decimal in the input mask, but I am not sure how to work around this issue. FYI my numeric type is set to Double as well.
Thanks!
Hi Mark,
Thank you for posting in our forums!
I recommend setting the Appearance.TextHAlign property directly. See an example below:
ultraNumericEditor1.Appearance.TextHAlign = Infragistics.Win.HAlign.Left
As for the exception, this occurs without the decimal in the mask, and even without a mask at all.
I have created a support case for you with an ID of CAS-194643-F9S0S4. The matter has been determined to be a development issue and has been logged in our tracking system with ID: 251059.
I will leave this case open and update you with any new information. You can view the status of the development issue connected to this case by going to the “Account” tab on our website, selecting "My Support Activity" and then this support case will be listed there. Then, you may select the "Development Issues" tab to view details of this development issue.
Please let me know if you have any questions.
Hi Michael,
Thanks for your reply and for investigating this issue. Do you have any workarounds I can implement for this at the moment?
It looks like you could set the MaskInput to something like: 999#.9999
This will still require at least one character to be used in the mask and will prevent the exception from happening.
The developer had a similar suggestion as a solution saying that the "9" mask is intended more for an individual number and not as part of a Double.
If it is possible, he recommends setting Nullable to true and using the "n" mask instead of "9".
If you have any further questions or concerns with this, please let me know and I will be glad to help.
The "9" character in a mask is a single digit character with no relationship to any other characters around it. So it's not really appropriate for UltraNumericEditor in general because UltraNumericEditor expects the mask to result in a single Double or Integer value which combines all of the digits. In fact, if you look at the MaskInput property documentation for UltraNumericEditor, it doesn't even list "9" or "#" as supported mask characters. They work at all only because the editor derives from EditorWithMask which is the base editor for all of the editor controls. These characters make sense only when the value being edited is a series of unrelated digits that do not result in a numeric value - for example a phone number of social security number.
"n" represents a number section and that's what you should use for UltraNumericEditor when dealing with double or integer values.