NumericUpDown Formatting Issue

4 posts, 0 answers
  1. Muds
    Muds avatar
    17 posts
    Member since:
    Jan 2015

    Posted 12 Mar 2015 Link to this post

    Hi

    We have a requirement wherein a NumericUpdown has to display numbers in a 2 digit decimal format.

    So the User enters - 40.12

    and Model value should be set to 0.4012

    can this be done by some formatting options ?

    Hope my question is clear.

    Thanks
  2. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 16 Mar 2015 Link to this post

    Hello Mudit,

    We are afraid that with its current implementation RadNumericUpDown does not support the desired by you functionality. We logged that in our Feedback portal as Feature Request, so you can vote for it and track its status on the following link:
    http://feedback.telerik.com/Project/143/Feedback/Details/153447-provide-an-option-to-set-custom-stringformat-for-the-value-of-radnumericupdown

    However, what we could suggest you as one possible approach to achieve the desired format for the Value is to bind it to a property inside the ViewModel. Inside its set implementation using some custom logic you could change the entered value into the desired format.

    Hopes this helps.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Muds
    Muds avatar
    17 posts
    Member since:
    Jan 2015

    Posted 16 Mar 2015 in reply to Nasko Link to this post

    yes, I could figure that out really !

    but don't you think having a value converter is going to be a better option than having view model supporting it ?
  5. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 16 Mar 2015 Link to this post

    Hello Mudit,

    Yes, you could also use a converter in order to achieve the needed functionality. So, you could choose the approach that best suits your needs and scenario.

    I hope this will help you.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top