Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
805
A little confused about MaskInput
posted

I'm using a UltraNumericEditor to help mask the input of dollar prices. I have set the field to a double, the formatter to #,##0.00##, and the MaskInput to {double:9.4}. Yes, prices can go to 4 places.

When I click into the field to type something in, the field changes to "0.0000". If you do what you'd expect to, and simply type in a value, it types in front of the 0. So typing 1 for $1 actually results in your typing $10. Bad!

Clearly I'm missing something here. Why is the 0 being entered into the field? How do I turn it off?

Parents
No Data
Reply
  • 805
    Suggested Answer
    posted

    The problem here turned out to be that the default was "not nullable" so the editor was putting a zero into the field. Switching this to Allow Nulls and setting the Value to (nothing) fixes the problem with the mysterious zero.

Children
No Data