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
235
Display leading 0
posted

Dear support team?

It is possible in a XamNumericEditor to display leading 0? That means for instance, if value = 10, 0010 should be displayed. If value = 9 0009 should be displayed and so on.

Parents
No Data
Reply
  • 2490
    Offline posted

    Hello hico,

    If you want to display leading zeros while in edit mode you can use a mask, e.g. Mask="nnnn". You will also have to set the PromptChar="0". Note that in this scenario "n" is a digit placeholder and its default value is underscore "_".

    If you want to achieve this functionality in non-edit mode you can use Format="0000".
    I have created a small sample which illustrates this approach you can find it as an attached file.

    XamNumericEditor_LeadingZero.zip
Children