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

Angular Kendo-grid pagination example

1 Answer 352 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 04 Oct 2014, 11:10 AM
Hi,

I have REST endpoint of a collection that supports an offset and limit query parameter. I am using angular ngResource to query this collection. The REST endpoint also supports the ability to retrieve the total count of the collection. I have similar query params to view the count based on search parameters.

Could somebody point me to a kendo-grid pagination example where I can use an ngResource based count and collection retrieval based on my custom query parameters.

Thanks,
Rajesh

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 Oct 2014, 07:01 AM
Hello Rajesh,

The Grid dataSource must be configured to know where the total count information is provided in the server response. This is achieved via schema.total:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.total

If you need to pass parameters with custom names to the data service, then use a parameterMap:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-transport.parameterMap

Note that your data service must return the total count together with the data, not separately. You can check the client requests and server responses in this demo to see this in action:

http://demos.telerik.com/kendo-ui/grid/remote-data-binding

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Integration with other JS libraries
Asked by
Rajesh
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or