Formatting Numbers

2 posts, 0 answers
  1. James
    James avatar
    37 posts
    Member since:
    Sep 2014

    Posted 19 Nov 2014 Link to this post

    I have several text boxes that are numeric values and would like for them to always have 2 decimal places (values can vary from less than 1 to several thousand) when displayed.  I have tried different masks but can not find one that will work for this.  I am also open to using the Numeric text box but would not want the increment and decrement arrows to display as those are not useful for this application.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 20 Nov 2014 Link to this post

    Hello James,

    In general, the MaskedTextBox widget is designed to work with a mask with a static length. That being said, you will need to define a mask that matches the max length of the number you would like to support. For instance, if you would like to support numbers from 1 to 99999, then the mask should look like this:
    mask: "99999.00"

    I would like to suggest you use the NumericTextBox widget with hidden up/down arrows.

    Let me know if I am missing something.

    Regards,
    Georgi Krustev
    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 ASP.NET MVC is VS 2017 Ready
Back to Top