Combobox behavior - IsEditable and not ReadOnly

2 posts, 0 answers
  1. Kakone
    Kakone avatar
    68 posts
    Member since:
    Jan 2010

    Posted 17 Jan 2011 Link to this post


    I don't understand the behavior of an editable and not readonly combobox. The Text property value can be different than the corresponding SelectedItem. Why ?
    For example, with your demo (configurator), I typed 'pa' then I delete the 'a' character. Why the 'Pavlova' agency is still selected ? (cf screenshot in attachment).

    Other question:
    I try to do an autocomplete combobox like in this blog:
    Althought it's not a readonly combobox, I would like to force the user to choose a value from the combobox. What is your suggestion to achieve this ?

  2. Boyan
    Boyan avatar
    758 posts

    Posted 20 Jan 2011 Link to this post

    Hi Kakone,

    Here is how it works. You have a property CanAutoCompleteSelectItems which is true by default for IsEditable RadComboBox. That is why the item is selected when autocomplete(note that this property works only if the drop down is opened) and if there are multiple items starting with the entered text it is always selecting the first one. That is why even when you delete the "a" you are still selected Pavlova(it is the first item starting with P). In order to clear the selection you have to delete the whole Text.

    What exactly is your scenario? have you tried to use IsFiltering= true to filter the items.

    All the best,
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top