Take the 2-minute tour ×

I have a web service from which I get text which is parsed into JSON using $parseJSON from jquery.

A client can get data from the web service by doing loading http://myserver/myfunction/{pagenumber}/{pagesize}

This will return an object

total: <some int> //A number indicating the total number of records
rowsForPage: [......] //An array with just the rows for the requested page

How can I use this endpoint as a datasource for a Kendo UI grid which will pass the page number and page size for the selected page.

For the life of me I cannot figure this out, but I would think this should be relatively simple.

share|improve this question
add comment

1 Answer

        dataSource: {
            serverPaging: true,
            schema: {
                data: function(data) {
                    return data.rowsForPage;
                total: function(data) {
                    return data.total;
            transport: {
                read: "http://myserver/myfunction"

As far as the url goes you have to parse out the url parameters skip and take to identify which records you should be passing back. If your page size is 100 and your page is 3 then it should pass

share|improve this answer
I think the question is more about how do you set the url read path myserver/myfunction/100/200 without overwriting the read value just before calling the server. I know how to do this for non-rest calls by setting parameterMap property of the datasource, but what if you need to modify the url, how do you tell datasource to append your params as url. –  Bobby_D_ Nov 19 '12 at 10:26
add comment

Your Answer


