This is a migrated thread and some comments may be shown as answers.

Formatting Numbers

1 Answer 141 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 19 Nov 2014, 04:09 PM
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.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 20 Nov 2014, 02:57 PM
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.

 
Tags
MaskedTextBox
Asked by
James
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or