Autocomplite with list

2 posts, 0 answers
  1. Ferenc
    Ferenc avatar
    1 posts
    Member since:
    Apr 2014

    Posted 14 Apr 2014 Link to this post

    Does anybody have any idea why the autocompile not working?

    Here my js code:

    var list = [];
    $.post('get_all_teaor', function(data){
        $.each($.parseJSON(data), function() {
            list.push("(" + String(this.id) + ") " + String(this.teaor_name) + "|");
        });
    });
     
    $("#business_branch").focus(function() {
        $(".foo").html(list);
        console.log(typeof(list));
        console.log(list.length);
        $('#business_branch').kendoAutoComplete({
            dataSource: list,
            placeholder: "Kérem várjon ..."
        });
    });

    It didnt show anything, but the list is not empty.
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 15 Apr 2014 Link to this post

    Hi Ferenc,

    Without the actual data that you pass to the AutoComplete widget we are not able to tell you what is wrong with it. Please use this jsBin to create a small runnable sample, with your data, so we can see what exactly goes wrong and advise you further.

    Thank you in advance for your cooperation.

    Regards,
    Kiril Nikolov
    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
Back to Top