I've used JayData to load data from OData enabled asp.net web api within following query:
.withInlineCount().filter('it.IsArchived != true').orderBy('it.dVehicle_01').take(6)
As a result, I have an array of entities, that have a property named totalCount which is correct.
Then I'd like to set this results and it's total count for kendo pager datasource.
I could set data, but for totalCount I've tested a lot of options, but I couldn't figure it out.
My data grid should work with both offline and online databases so using kendo ui remote data source is not a suitable option for me.
you can set it in the schema configuration,
schema: {
total: function (data) {
return data.totalCount ;
}
}
you mean that it worked with the old version and stopped working with the recent version ? with the old version it just worked out of the box: http://jaydata.org/examples/KendoUI/Grid_ReadOnly
if you have to setup paging manually then see this example: http://jaydata.org/examples/KendoUI/ListView
之前,我已经测试了很多选项,但是在最近的kendoUI api更改中,我们应该获取kendo.data.dataSource类的实例,而不是使用旧语法为pager提供dataSource。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.