This is a migrated thread and some comments may be shown as answers.

What am i doing wrong in my code :(

1 Answer 19 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Nadia
Top achievements
Rank 1
Nadia asked on 11 May 2014, 07:17 PM
hi all, I don't know what am I doing wrong here, its a pretty straight forward things. autocomplete is not showing anything.


moviesuggestions =
new kendo.data.DataSource({
    autoSync: true,
    transport: {
        read: function (options) {
            theMovieDb.search.getMovie({ "query": $("#seriesname").val(), search_type: "ngram" },
            function (data) {   //success
                options.success($.parseJSON(data).results);
            }, function (data) {    //error
                options.error($.parseJSON(data).results);
            });
        }
    }
});
 
autocomplete = $("#seriesname").kendoAutoComplete({
    datasource: moviesuggestions,
    dataTextField: "title",
    suggest: true
});

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 12 May 2014, 08:54 AM
Hello Nadia,

From the provided sample I cannot tell you what exactly is the problem in your code. Here is a code sample showing a working autocomplete that you can edit. So please edit the example in order to show the issue that you are facing, so we can better assist you:

http://jsbin.com/kuqubo/2/edit

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
AutoComplete
Asked by
Nadia
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or