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

Server Paging

0 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 27 Jul 2012, 09:28 AM
I'm trying to set up server paging for remote data that I'm accessing via an ajax call. My dataSource looks like this:

var data = new kendo.data.DataSource({
        transport: {
            read: function(options) {
                $.ajax( {
                    url: "http://localhost/Projects/rpc",
                    contentType: "application/json",
                    dataType: "json",
                    data: JSON.stringify({"method": "breq.getBreqs"}),
                    type: 'POST',
 
                    success: function (result) {
                        //alert("success");
                        options.success(result)
                    },
                    error: function (jqXHR, textStatus, errorThrown) {
                        alert("Error: " + textStatus);
                        options.error(jqXHR, textStatus, errorThrown)
                    },
                });
            }
        },
        serverPaging: true,
        pageSize: 10,
        schema: {
            data: "result"
        },
 
    });

I understand that the server has to handle the paging itself however when I look at the AJAX request through chrome developer tools all I can see in the request payload is "{"method": "breq.getBreqs"}". Is the positioning of my paging settings correct and what is sent in the request to represent it so that I can pick it up on my server?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Share this question
or