Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Problem with page count (JSON)
posted

I am trying to load data from a response.json file, where totalRecords is specified as 1000. However the page count is not being calculated correctly:

jQuery.ajax({
url: 'http://localhost:8080/ecom/response.json?callback=jsonp',
type : "GET",
dataType : "jsonp",
jsonpCallback: 'jsonp',
jsonp: 'callback',
success: function(data) {

$.ig.loader(function () {
var _isDataBound = false;
var logCounter = 0;


$("#grid1").igGrid({


autoGenerateColumns: false,
dataSource: data,
autoCommit: true,
responseDataKey: "Records",
columns: [ .... ]

{
name: 'Paging',
type: "local",
pageSizeList: [5, 10, 25, 50, 100],
pageSize: 100,
recordCountKey: "totalRecords"
}

response.json contains the following code:

jsonp({ "Records" :[<DATA IS HERE WITH 50 RECORDS OF THE TOTAL RESULT SET OF 1000 FROM THE SERVER>], "totalRecords" : 1000})

What am I doing wrong?