3 posts, 0 answers
  1. Elisabeth
    Elisabeth avatar
    8 posts
    Member since:
    Nov 2012

    Posted 20 Dec 2012 Link to this post

    I'm trying to use the RadMaskedTextBox. What I need to do is to allow the user to enter 3 different formats.

    Below are examples




    If he enters 132 then there is nothing different but if he types in 1234 then as soon as he enters 4, I need to display the dash. It is the same for 7. I can't use a validator as I need it on the entry and not when he is validating the page.

    I thought about using a mask but I don't want to display the dash when the page loads in case he only types in 3 digits. I thought about a regular expression but I don't know how to implement only when the user is typing and not validating.

    Maybe the RadMaskedTextBox is not the right control to use.

    Thank you for your help.
  2. Eyup
    Eyup avatar
    2941 posts

    Posted 25 Dec 2012 Link to this post

    Hello Elisabeth,

    I am afraid this functionality is not provided out-of-box. You will need to use the client events of the input to implement your logic ( OnValueChanged event for instance ).

    I hope this helps.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
  4. Elisabeth
    Elisabeth avatar
    8 posts
    Member since:
    Nov 2012

    Posted 08 Jan 2013 Link to this post

    Hi Eyup,

    thanks for your reply.

    I ended up using OnKeyPress and OnValueChanged and it works fine.

Back to Top