Can DisplayMask be applied for RadNumericTextBox?

2 posts, 0 answers
  1. Rober Rajiv
    Rober Rajiv avatar
    6 posts
    Member since:
    Aug 2009

    Posted 16 Apr 2010 Link to this post


    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?

  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 16 Apr 2010 Link to this post

    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.
Back to Top