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

Force user to only select from the available list

4 Answers 237 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Jean
Top achievements
Rank 1
Jean asked on 02 Dec 2013, 02:30 PM
Hi,

By default the AutoCompleteBox behaves like a free-text control, whereby one can type any text.
If the input text has any match, these show in the dropdown, else the dropdown is blank.

How can i force the user to only select from the available list of items?


Thanks,
Olivier.

4 Answers, 1 is accepted

Sort by
0
Dieter
Top achievements
Rank 1
answered on 04 Dec 2013, 08:32 AM
Hi,

I'm having the same problem.
When I type out the full value, my selected item is null. 

Pretty similar to an older issue: (http://www.telerik.com/community/forums/wpf/autocompletebox/when-user-types-out-full-item-name.aspx)
Is this fixed by now?

Thanks in advance,
Dieter
0
Kalin
Telerik team
answered on 05 Dec 2013, 08:40 AM
Hi guys,

Oliver, for this scenario you may need to use RadComboBox instead of the AutoCompleteBox. You would just need to its IsEditable and IsReadOnly properties to true - this way the user will be only able to type only from the items in ComboBox. Please give it a try and let us know if this works for you.

Dieter, in the current implementation when you have typed the full value and press Enter or lose the focus the matched item has been selected.

Hope this helps.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Tessa
Top achievements
Rank 1
answered on 10 Apr 2017, 03:36 PM

Hi Kalin, 

I am wanting to force the User to only select from the Available list too. 

You have given a solution of using the RadComboBox - but I am currently switching from the RadComboBox to the AutoCompleteBox due to other restrictions with the RadComboBox.

Please can you tell me if there is any way of getting this behaviour for the AutoCompleteBox please.

Thanks

Tessa

0
Kalin
Telerik team
answered on 13 Apr 2017, 08:32 AM
Hi Tessa,

Could you please share some more details regarding the exact scenario you need to achieve? You want  to allow users to type only text from the items in the ItemsSource? If so this is not supported from the control - however it could be easily achieved with RadComboBox.

If you explain the scenario we would suggest the best possible solution. I'm looking forward to hearing from you.

Regards,
Kalin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
AutoCompleteBox
Asked by
Jean
Top achievements
Rank 1
Answers by
Dieter
Top achievements
Rank 1
Kalin
Telerik team
Tessa
Top achievements
Rank 1
Share this question
or