I don't understand the meaning or the usefullness of Autocomplete in a DropDownList
If I just have a regular DropDownList, Autocomplete-Like-Behaviour is already working fine, you type the first character, it's autocompleted.
Why having 2 different DataSources for the same input ?
radCheckedDropDownList1.DataSource = items;
radCheckedDropDownList1.ValueMember = "ID";
radCheckedDropDownList1.DisplayMember = "Label";
radCheckedDropDownList1.CheckedMember = "Checked";
radCheckedDropDownList1.AutoCompleteDataSource = items;
radCheckedDropDownList1.AutoCompleteValueMember = "ID";
radCheckedDropDownList1.AutoCompleteDisplayMember = "Label";
I do not even have an idea, which List is coming up, if I start typing ? The DropDownList, or the Autocomplete-Dropdown ?
In what situations is it useful to have this combination ?
5 Answers, 1 is accepted
Thank you for writing.
The main difference in the two approaches is that in the first case you actually have items in RadDropDownList. If you don't type anything in the editable part and simply click the arrow button, the popup will be filled with items and the RadDropDownList.Items collection will be populated with data. On the other hand, if you set only the AutoCompleteDataSource property, RadDropDownList won't be populated with items and if you press the arrow button the popup will be empty. Only when you type something in the text box the autocomplete popup will be filled with the suggestions. But these items are only available for the autocomplete popup, the Items collection still remains empty. It is up to you which approach you will use. It depends on the requirement that you have.
Additional information about the autocomplete functionality and the data-binding process is available in the following help article:
I hope this information helps. Should you have further questions I would be glad to help.
I understand the two functions one by one.
A Dropdownlist without Items (just with Autocomplete) behaves exactly like a Textbox. There is no reason to choose the DrowpDownControl. There is nothing to drop.
A Dropdownlist with items (without Autocomplete) behaves almost like Autocomplete, at least with DropDownStyle set to "Dropdown". You can type, the best fitting element is selected - without having any AutoComplete configured.
There must be a reason, why a Dropdownlist has got this additional feature of Autocomplete. Why had Telerik this feature added to a Dropdown ? Now I have a control, with two different dropdowns/popups, each having two different list of content, but both dropdowns have the same target textbox.
It is also OK, if you confirm, it is not useful to have two different, or twice the same Lists (DataSource and AutoCompleteDataSource) to the DropDownList at the same time.
For me it looks like, the same functionality is implemented twice. (with the little extra that the arrow button works without typing anything)
Thank you for writing back.
Note that you can populate the RadDropDownList.Items collection when setting the DataSource property and don't enable the autocomplete. Thus, you simply have some items when you open the popup with the arrow. The DataSource and AutoCompleteDataSource properties have different purpose for usage. Hence, feel free to use this one which suits your requirement best. It is not necessary to specify both of them at simultaneously. I would recommend you to bind RadDropDownList with data and specify the AutoCompleteMode property.
I hope this information helps. If you have any additional questions, please let me know.
I found out, AutoComplete is implemented in RadDropDownList more sophisticated than in any other Element.
It got things like
e.AutoCompleteSuggest.SuggestMode = SuggestMode.Contains;
e.AutoCompleteAppend.LimitToList = true;
which is unique. Therefore, it has some advantages over using a TextBoxControl with AutoComplete for the same purpose.
This "Contains" is very useful, f.e. if you have data with "<firstname> <lastname>" and you never know which order the user is typing the words. Regular DropDown with AutoCompleteMode would not support this.
It also works fine, to attach the same DataSource to "DataSource" and "AutoCompleteDataSource", they can coexist.
The user will hardly notice, there are two different popups/dropdowns, depending on what he types.
As a wish for future developments, I would encourage to get this support with AutoCompleteSuggestHelpers and AutoCompleteAppendHelpers in other Elements also.
It's very nice to have control of order of things, since today you often have an heuristic approach, you suggest the item that is most often used, oder most recently used, not just anything that fits in.
Thank you for writing back.
Indeed, RadDropDownList provides a very flexible machanism for handling the autocomplete helpers. I am glad that it suits your scenario. Your feedback is greatly appreciated. Note that we are constanly striving to improve our suite when it is possible. For the new controls/features, we are focused on providing the most efficient API for the users. We will consider such an autocomplete behavior for future improvement of the suite.
If you have any additional questions, please let me know.