How to prevent typing

5 posts, 1 answers
  1. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 09 Jul 2015 Link to this post

    Hi

    My auto complete box gets populated with tokens programmatically by other actions on my page, I would like the user to be able to delete these tokens but not to be able to type in free text - is this possible?

     

  2. Aneliya Petkova
    Admin
    Aneliya Petkova avatar
    207 posts

    Posted 10 Jul 2015 Link to this post

    Hi Al,

    Please try the approach suggested in the following forum post:
    http://www.telerik.com/forums/set-readonly-radautocompletebox#hrWw_rapWkixGDEPfSS67w

    Regards,
    Aneliya Petkova
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 10 Jul 2015 in reply to Aneliya Petkova Link to this post

    Hi Aneliya,

    I saw that post but couldn't get it working. I set the OnClientLoad for my auto-complete and added the handler:

    function OnClientLoad(sender) {
     
        $telerik.$(".racInput").attr("disabled", "disabled");
     
    }
     

     is racInput an internal class or should I use my own control? (but then I'd expect to use: var autoCompleteBox = $find("<%= acTree.ClientID %>");)

    Could you please show the aspx for the code above?

     

  5. Answer
    Aneliya Petkova
    Admin
    Aneliya Petkova avatar
    207 posts

    Posted 10 Jul 2015 Link to this post

    Hi Al,

    Please find attached a sample project, demonstrating this approach.

    Regards,
    Aneliya Petkova
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  6. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 10 Jul 2015 in reply to Aneliya Petkova Link to this post

    Thanks Aneliya, it is weird that code is exactly what I used before and it wasn't working but now it is working fine.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017