This question is locked. New answers and comments are not allowed.
Hi
I have been struggling for the past few days with Endless Scrolling on a mobile listview. I have set up my datasource and listview as the demo suggests. I have not been able to successfully get it to work (or 'press to load more' for that matter) on server-side data. The local data works as expected. I have used many different KendoUI core builds and the results are pretty much the same.
One difference I did notice though, is the type: "odata" part in the demo that refuses to work for me (500 Internal Server Error). I therefore tried a normal "GET" type on the datasource. The "GET" was odata-style (https://myserviceapi.azure-mobile.net/tables/EventTypes?$filter=businessID%20eq%2053) which is supported out of the box on Azure Tables, but endless scrolling did not work. I also tried a normal "GET" of an Azure Mobile Services api method that is basically a RESTful method that returns the same data as the odata table query in SQL Azure. None of the things I have tried work. The following code is what I have and tested with many Kendo UI Core builds.
JavaScript:
HTML:
SQL. Also tried using this SQL in the non-odata Azure Mobile Service API method that's in NodeJS. The datasource will parse the page and pageSize Query and I manually add the busID when I'm not using an odata query:
I have been struggling for the past few days with Endless Scrolling on a mobile listview. I have set up my datasource and listview as the demo suggests. I have not been able to successfully get it to work (or 'press to load more' for that matter) on server-side data. The local data works as expected. I have used many different KendoUI core builds and the results are pretty much the same.
One difference I did notice though, is the type: "odata" part in the demo that refuses to work for me (500 Internal Server Error). I therefore tried a normal "GET" type on the datasource. The "GET" was odata-style (https://myserviceapi.azure-mobile.net/tables/EventTypes?$filter=businessID%20eq%2053) which is supported out of the box on Azure Tables, but endless scrolling did not work. I also tried a normal "GET" of an Azure Mobile Services api method that is basically a RESTful method that returns the same data as the odata table query in SQL Azure. None of the things I have tried work. The following code is what I have and tested with many Kendo UI Core builds.
JavaScript:
var dataSource = new kendo.data.DataSource({ transport: { read: { url: 'https://myserviceapi.azure-mobile.net/tables/EventTypes?$filter=businessID%20eq%20' + busID, dataType: "json" } }, serverPaging: true, pageSize: 12 });$("#photoHolder").kendoMobileListView({ dataSource: dataSource, template: "<p>#: eventName #</p>", endlessScrolling: true, filterable:{ field: "eventName", operator: "contains", ignoreCase: true, placeholder: "search products..." } });HTML:
<ul id="photoHolder" data-role="listview"></ul>SQL. Also tried using this SQL in the non-odata Azure Mobile Service API method that's in NodeJS. The datasource will parse the page and pageSize Query and I manually add the busID when I'm not using an odata query:
exports.get = function(request, response) { var mssql = request.service.mssql; var cnt = request.query.pageSize; var pnm = request.query.page; var sql = "SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER BY zOrder) AS RowNum, * FROM myschema.EventTypes where (businessID = " + request.query.busID + ") and active = 1) AS E " + "WHERE RowNum BETWEEN ((" + pnm + " - 1) * 20 + 1) AND (" + pnm + " * " + cnt + ") ORDER BY zOrder"; mssql.query(sql, { success: function(results) { response.send(200, results); }, error: function(err) { console.log(err); response.send(530, { error: err }); } });};