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
40
Formatting the UltraNumericEditor
posted

Is there a way to configure the UltraNumericEditor so that it will retain any trailing zeros a user enters?  For example if the user enters "1.20" and tabs away from the control, it will display "1.20".  Also, if the user enters "1.200"  it will display "1.200".

I would like to maintain this behavior even if the Value property is set in this manner:

ultraNumericEditor.Value = "1.20"  -> control displays "1.20"

ultraNumericEditor.Value = "1.200" -> control displays "1.200"

Parents
  • 9298
    posted

    Bob,

    If you set the MaskInput of the UltraNumericEditor to "nn.nnn" then 1.200 should be displayed as 1.200.  However, if you do that then 1.20 will also be displayed as 1.200.  Those 0's will be filled out according to the MaskInput.

    There does not seem to be a way to prevent any trailing zeros that the user does not type in from being filled out according to the MaskInput.

    If you really need to distinguish between these two cases you may be able to achieve it by using the UltraMaskedEdit and setting its InputMask to "nn.999"  (Also set the EditAs property to Double).

    I hope that helps.

    Michael S.

     

Reply Children