I have a problem with setting totalPages. In free version, totalPages was set automatically, but now its not.
I already have a helper .NET method that worked for free version, and I use it with getUrl, so since I switched to PRO I dont want to change it, I want to keep using the same method (without parameters, gets them from querystring).
I have read this example
http://paramquery.com/pro/demos/pagingI dont understand how is totalPages set. I read that for remote you need to set it manually, but in this example it is not set.
Here is relevant part of my code
var pageM = {
type: 'remote',
curPage: 1,
totalPages: 3,
rPP: 30,
rPPOptions: [5, 30, 50]
}
var dataM = {
location: "remote",
sorting: "remote",
dataType: "JSON",
method: "POST",
sortIndx: 0,
sortDir: "up",
getUrl: function () {
},
getData: function (dataJSON, textStatus, jqXHR) {
$("#patients_loader").hide();
$(".container_patientlist").show();
if (dataJSON != null)
{
return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
}
}
}
var $gridPatients = $("#grid_patientlist").pqGrid({ width: "auto", height: 700,
dataModel: dataM,
pageModel: pageM,
colModel: colM,
resizable: false,
showTop: false,
showBottom: true,
flexHeight: true,
editable:false,
columnTemplate : { width: '10%' },
selectionModel: { type: 'none' } ,
scrollModel: {autoFit: true}
});