Comparable control to FilteredTextBox from ASP.NET AJAX Control Toolkit

8 posts, 0 answers
  1. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 06 Mar 2011 Link to this post

    Hi
    I need to limit the input on all the controls of the page to a certain group of characters.
    The input is fed to a banking system that can accept only ASCII 032-0126 with the exception of 23 characters in this range ($, £, @, #, ...).

    MS AJAX Control Toolkit's FilteredTextBox  appears to be doing the job with the ValidChars attribute.

    Is there a comparable capability for Telerik?

    I'd hate to add the MS AJAX  toolkit to my pages as it would increase size and potentially complexity.
    Chen
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Mar 2011 Link to this post

    Hello Chen,

    I guess RadMaskedTextBox  is an option for you. It is an enhanced data entry control that uses a mask to distinguish between proper and improper user input.

    Take a look at the following help article for more on this.
    RadmaskedTextBox Basics

    Thanks,
    Shinu.
  3. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 07 Mar 2011 Link to this post

    Shinu, I am not sure I can implement what I need with the RadMaskedTextBox.
    Let's say I want the textbox to accept just 'a', 'C', 'Z', '=' and '2'. Just these 5 characters, and they can be in any position in a long string. 

    So for example, this is a valid string: CaZ2Z=a
    This is not: C3aZ

    Is there a way for me to do it  with the RadMaskedTextBox?

  4. Marin
    Admin
    Marin avatar
    1057 posts

    Posted 10 Mar 2011 Link to this post

    Hi Chen,

    Another option is to use RegularExpressionValidator with RadTextBox to limit its allowable values as shown in this help article.

    All the best,
    Marin
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 10 Mar 2011 Link to this post


    I understand that a validator can somewhat help here, but my question is very specific.

    Does Telerik have a control with a similar functionality to  FilteredTextBox that actually limits characters at the entry stage.

    Alternatively is there a javascript function I can use as this limitation is for all the controls on the page.

    Thanks again
    Chen
  6. Marin
    Admin
    Marin avatar
    1057 posts

    Posted 14 Mar 2011 Link to this post

    Hello Chen,

    Another option is to use the RadInputManager and its RegExpTextBoxSetting to configure an ordinary textbox to accept only specific type of input. Other than that we do not have a specific input control that limits input values in such way.

    Another common client-side approach for validating is to handle the form's onsubmit event and add there validation logic which will prevent the form from submitting if the input is incorrect.

    Regards,
    Marin
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  7. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 14 Mar 2011 Link to this post

    You the man!

    RadInputManager is what I need with the regular expression.
    I just set what characters I allow and assign it to all the controls on the page.

    A suggested improvement is to add functionality that stops the user from entering characters out of range, rather than validating after blur.

    For now it works. Thanks again.
  8. Marin
    Admin
    Marin avatar
    1057 posts

    Posted 14 Mar 2011 Link to this post

    Hello Chen,

    Thank you for the suggested improvement.

    Glad to hear RadInputManager worked in your case.

    Greetings,
    Marin
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top