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

Allow user input (not only selection)

4 Answers 70 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Jasna
Top achievements
Rank 1
Jasna asked on 20 Dec 2012, 04:50 PM
Hello,
Is there a way to allow user input into AutoCompleteBox (text that is not in the list)?

4 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 25 Dec 2012, 09:39 AM
Hello Jasna,

Yes, you could type text which is not in the list, but after that what do you need to happen with the text? Should it be added to the collection or deleted from the TextBox of the Autocomplete?
If you could give us some more details what exactly you want to achieve, we will be able to assist you in the best manner.

Kind regards,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jasna
Top achievements
Rank 1
answered on 27 Dec 2012, 04:42 PM
Hello Konstantina,

What I was looking from AutoCompleteBox is for user to either pick from the preset list or type the text.

For example:
Allowing the user to choose the text color of the report: in the list there is brown and black color but user should be able to type blue.
The entered (or picked) text color is saved and used when making that report.

Regards,
Jasna
0
Accepted
Konstantina
Telerik team
answered on 28 Dec 2012, 03:42 PM
Hello Jasna,

In order this to be achieved you need to hook to the KeyDown event of the AutoCompleteBox and add there the new item to its ItemsSource. Please find attached a sample application which illustrates this.

Hope this helps.

Regards,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jasna
Top achievements
Rank 1
answered on 07 Jan 2013, 01:50 PM
Hello Konstantina,

Thank you for the time and effort you took to make the example application.
It accomplishes what I wanted to do.

Have a nice day,
Jasna
Tags
AutoCompleteBox
Asked by
Jasna
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Jasna
Top achievements
Rank 1
Share this question
or