Pagination and count of element when a custom function is used


#1

I have a kendogrid that in order to be populated uses a datasource that calls a custom js function I implemented on a not persistable type.
The issue here is that the count of number of records at the bottom right of the kendo grid shows “no data” instead of the returned number of objects and the page show “0” instead of 1

How can I make it show the right values? Do I need to define an evaluate function?


#2

Have the function return FetchResult<ReturnType>


#3

KendoGrid relies on this format of response to do pagination


#4

I have cases where it works and the function does not return a FetchResult but array of Types


#5

Are those examples using noRemotePagination: true ?


#6

They are not using it


#7

It might also depend on your responseSelector and responseTransform


#8

to fix this I had to define an evaluate function on the non persitable type that is shown on UI then I had to set the “listenToPageRecord”: true and pages and count of objects are properly at the bottom of the Kendo Grid