Clear Selection when item not in list

4 posts, 0 answers
  1. syed
    syed avatar
    21 posts
    Member since:
    Sep 2010

    Posted 28 Oct 2010 Link to this post

    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.
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 02 Nov 2010 Link to this post

    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
  3. DevCraft banner
  4. Chris Moore
    Chris Moore avatar
    14 posts
    Member since:
    Jul 2009

    Posted 21 Dec 2010 Link to this post

    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.
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 Dec 2010 Link to this post

    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
Back to Top