Autocomplete dropdown does not show up

4 posts, 1 answers
  1. Madzie
    Madzie avatar
    65 posts
    Member since:
    Apr 2012

    Posted 31 Dec 2013 Link to this post

    Hello,
    Now an experience with AutoComplete control.
    There is this control, which has minLength = 3, and keyup event hits server to get data that is searched for. Now if the desired lookup for data is say 39015 which gets records that has a column with this value (from DB), so what a strange thing I observe is, when i start typing each char i.e. 3..9..0.1..5 one by one - it hits the server each time - the problem is :
    - If the typing is slow as in wait for each server call to get completed, it shows up the popup.
    - If typing in is arbitary, like slow or fast or a mix, say 39 and then 015, it doesn't show up the popup.

    Although, the data being fetched is correct for all the inputs. But issue comes up with showing up the popup.

    I read it over in one the forum threads, to use SEARCH() method- so what i did is : call the search method in change event, checking if number of items returned are > 0.
    It resolves the problem but but it arises another problem - I see in debugger that it calls the datasource read method until a selection from popup is made, which is a big bash to performance. Is there a way to control it or any other clean way to just open the popup once data is fetched.

    ko.bindingHandlers.kendoAutoComplete.init = function (element, params) {
            ////debugger;
            var e = $(element);
    var widget = e.data("kendoAutoComplete");

      widget.dataSource.bind("change", function (d) {
                    //anytime the data source is updated, update the data pointer and the input
                    if (d.items) {
                        data = new kendo.data.ObservableArray(d.items).toJSON();

                        //Sometimes the dropdown isn't rendered - force it to show up/ search from the populated datasource of the autocomplete
                        if (d.items.length > 0) {
                            widget.search(d.items[0].CompanyName);
                        }
                    }
                });
  2. Madzie
    Madzie avatar
    65 posts
    Member since:
    Apr 2012

    Posted 31 Dec 2013 Link to this post

    FYI, the version used are :
    Kendo - 2013.3.1119
    JQuery - 1.9.1
  3. Kendo UI is VS 2017 Ready
  4. Answer
    Madzie
    Madzie avatar
    65 posts
    Member since:
    Apr 2012

    Posted 02 Jan 2014 Link to this post

    Hello,

    I am not able to reproduce the issue on my side. Can the problem be reproduced in our online demos? If yes, then could you share the exact steps or a screen cast. If not then could you provide a runnable sample which replicates this behavior?
    As for opening the popup without making a request - it is possible to achieve this by using the popup open method:
    widget.popup.open();


    Regards,
    Daniel
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Madzie
    Madzie avatar
    65 posts
    Member since:
    Apr 2012

    Posted 04 Jan 2014 Link to this post

    Sorry, its huge application that is facing this problem. But yes the other way to open a popup is good enough to work with now. Thanks.
Back to Top
Kendo UI is VS 2017 Ready