RadmaskedTextBox Mask Help

3 posts, 0 answers
  1. Baal
    Baal avatar
    47 posts
    Member since:
    Mar 2008

    Posted 04 Mar 2010 Link to this post

    Hi.

    I want to use a RadMaskedTextBox to have my users force to use a valus in certain way. The input I am expecting is in the format <number>.<number>. Either side of the . has numerical value and there is no restriction on the length of the number, it can be as low as 1 and as high as 999,999,999.

    I tried using Mask="<1..999999999>.<1..999999999>" but this will show up as 000000001.000000001 in the textbox when the page loads. If users want to type in 44.44, they will have to skip the first seven 0s to enter the 44 on each side of the period.

    I also tried Mask="<#|##|###|####|#####|######|#######>.<#|##|###|####|#####|######|#######>" but this doesn't render properly as well; shows up as #______.#______ in the textbox.

    Is there any way to solve this problem? Or is my scenario best handled with RadTextBox and asp RegularExpressionValidator?

    Thanks.
    Gaurab
  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 08 Mar 2010 Link to this post

    Hello Baal,

    Judging by your explanation, I believe the RadNumericTextBox control will be suitable for your scenario. Please examine the following links and let me know whether this helps.
    RadNumericTextBox First Look online demo
    Using RadNumericTextBox help topic
    Formatting Numeric Values

    Best regards,
    Daniel
    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.
  3. Baal
    Baal avatar
    47 posts
    Member since:
    Mar 2008

    Posted 12 Mar 2010 Link to this post

    Thanks Daniel.

    Looks like, from your last link, GroupSeparator and GroupSize properties in RadNumericTextBox could have solved my problem. However, I have already solved the problem using RadTextBox and RegularExpressionValidator so I guess I'm fine with it for now.
Back to Top