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

Ajax call and kendo data source together

0 Answers 331 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
raj
Top achievements
Rank 1
raj asked on 03 Feb 2012, 08:58 AM
Hello
     I have a requirement where I ll do a $.ajax call and then store the ajax call response to a kendo datasource...like below
   $.ajax({
                url: url,              
                type: 'POST',
                contentType: 'application/json',
                dataType: 'json',
                success: function (responsedatas) {
                     ///I got datas here..If i put debugger im able to see the datas
                      var KendoSource = new kendo.data.DataSource({ data: responsedatas});
                       $("#grid").kendoGrid({
                    dataSource: {
                        data: KendoSource
                    },
                    height: 360,
                    groupable: false,
                    scrollable: false,
                    sortable: false,
                    pageable: false,
                    columns: [{
                        field: "ContactID",

                        title: "ContactID"
                    }]
                });
                }
            });

If i do the above code...My grid doesn't have datas... If i give the responsedatas directly to the grid data..IM able to get the grid properly..But i wanna use kendosource..I was testing this kendosource to work..I have lots of requirements on kendosource...

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
raj
Top achievements
Rank 1
Share this question
or