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

Can DisplayMask be applied for RadNumericTextBox?

1 Answer 142 Views
Input
This is a migrated thread and some comments may be shown as answers.
Rober Rajiv
Top achievements
Rank 1
Rober Rajiv asked on 16 Apr 2010, 01:03 PM

Hi,

Currently I am using RadNumericTextBox for accepting decimal values. I need to set the MaxValue,MinValue and Precision which works fine with RadNumericTextBox.

However there is a need to set the masking for the numbers. The mask can be of any format. Few examples for the possible number format are

0                          -->          Displays numbers without any further formatting, for example: 1234.

#,##0                   -->          Formats numbers with the thousands separator, for example: 1,234.

#,##0;(#,##0)       -->          Formats numbers with the thousands separator, and places negative numbers in parentheses. For example:

• 1234 appears as 1,234

• -1234 appears as (1,234)

Also the masking is for Display purpose only and when I fetch the data for saving, I need only the values without any formatting applied on it.

Since the display masking is dynamic and I cannot enforce the same using DecimalSeperator, GroupSeperator and Precision property of the RadNumericTextBox

Is there a way to achieve this masking in RadNumericTextBox similar to what we have in radmaskedtextbox?

Conversely,  can I achieve all the above said (maxvalue, minvalue and precision including) in radmaskedtextbox?

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 16 Apr 2010, 01:53 PM
Hello Rober Rajiv,

 Instead of using mask  I could suggest you to comine regular expression with RadNumericTextBox to additionally validate user input while typing. You can use RadNumericTextBox's OnKeyPress event to  validate by that regex.


Best wishes,
Maria Ilieva
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Input
Asked by
Rober Rajiv
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or