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

Clear Selection when item not in list

3 Answers 159 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
syed
Top achievements
Rank 1
syed asked on 28 Oct 2010, 08:42 AM
Hi All,
I'm using Radcombobox as autocomplete. User can write in the text box and the matched items are shown in the dropdown list. 

Is there any built in feature that if the autocomplete lose focus and the written text is not matched in the item list, the textbox value gets clear.   so by this whenever my autocomplete textbox has value, it means it is also in its list also. 



Thanks.

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 02 Nov 2010, 08:49 AM
Hello Syed,

Thank you for your question.

Unfortunately, there is no build in way to clear the text if it doesn't match the lest. However, you can easily implement it on the LostFocus event of the RadComboBox.

Please let us know if you have any other questions.

All the best,
Konstantina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Chris Moore
Top achievements
Rank 1
answered on 21 Dec 2010, 09:32 PM
This is a common need; in fact, I would wager that most people make combo boxes editable just so the autocomplete will work. Then, if the user types something in that's not in the list, whatever property is bound to the SelectedItem property never changes and so if A, B, and C and B is selected, and the user types in D, the selected item will still be B. There should be an instrinsic way to specify that a user cannot type in an item that is not in the list.
0
Konstantina
Telerik team
answered on 22 Dec 2010, 12:08 PM
Hi Syed,

I can suggest you to set the IsReadOnly property to True along with the IsEditable="True". In that way the Autocomplete will work, but the user won't be able to type something that is not in the list.

Hope this information helps. Please let us know if you have further questions.

Kind regards,
Konstantina
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
ComboBox
Asked by
syed
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Chris Moore
Top achievements
Rank 1
Share this question
or