This is a migrated thread and some comments may be shown as answers.

How to prevent typing

4 Answers 68 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Iron
Al asked on 09 Jul 2015, 01:06 PM

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?

 

4 Answers, 1 is accepted

Sort by
0
Aneliya Petkova
Telerik team
answered on 10 Jul 2015, 06:35 AM
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
0
Al
Top achievements
Rank 1
Iron
Iron
Iron
answered on 10 Jul 2015, 06:56 AM

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?

 

0
Accepted
Aneliya Petkova
Telerik team
answered on 10 Jul 2015, 07:13 AM
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
0
Al
Top achievements
Rank 1
Iron
Iron
Iron
answered on 10 Jul 2015, 07:40 AM
Thanks Aneliya, it is weird that code is exactly what I used before and it wasn't working but now it is working fine.
Tags
AutoCompleteBox
Asked by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Aneliya Petkova
Telerik team
Al
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or