How to display all items in the autocomplete widget

3 posts, 1 answers
  1. Douglas
    Douglas  avatar
    10 posts
    Member since:
    Sep 2011

    Posted 26 Nov 2013 Link to this post

    Hi,

    Is it possible to display all available items in autocomplete widget without changing the source code?

    I’ve got something like this, that is an attempt to open the options when textfield receives focus, but it is not working.

     $("#myAutoComplete").kendoAutoComplete({
    dataSource: ["Item1", "Item2"],
    delay: 100,
    minLength: 0
    });

     $("#myAutoComplete").focus(function () {
    $("#myAutoComplete").data("kendoAutoComplete").search("");
    });

    Thanks
    Doug
  2. Answer
    Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 27 Nov 2013 Link to this post

    Hi Doug,

    The AutoComplete widget has not been designed to return all items or to "search" by an empty string.

    Theoretically, you could achieve the desired behavior by using server-side filtering and using some "magic" search string, that will be recognized by the web service, which will return all data items in that case.

    Alternatively, if the total number of items is reasonable and will not cause a browser hang, use the ComboBox widget instead.

    http://demos.kendoui.com/web/combobox/serverfiltering.html

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Douglas
    Douglas  avatar
    10 posts
    Member since:
    Sep 2011

    Posted 04 Dec 2013 Link to this post

    Thanks this is what we have done.
Back to Top