So with the following code
1. Pager is not visible
2. Could you tell me how to pass current page & records per page to a service via $POST ? In $GET example you referred me to I don't seem to find where filters are being passed to a service, it seems to be a plain call without parameters.
var dataModel = {
location: "remote",
sorting: "local",
pageModel: { type: "remote", rPP: 20, strRpp: "{0}", curPage: 1 },
dataType: "JSON",
method: "POST",
getUrl: function (ui)
{
var filters = { "Name" : $("#txName").val(),
"curPage": 1,
"recPerPage": 20
};
return {
url: "../services/Search.php",
data: { dataBuffer: filters }
};
},
getData: function (dataJSON)
{
var data = dataJSON.DataArray;
return { curPage: dataJSON.curPage, totalRecords:1000, data: data };
},
error: function (err)
{
alert ("Error: " + err + "\n Please contact administrator with your input!");
}
};
columnModel = [
{title:"Name", width:150, dataType:"string", align:"right", className:'grid-col', editable: false}
];
$("#grid_array").pqGrid( {
dataModel: dataModel,
colModel: columnModel,
showTitle: false,
collapsible:false,
scrollModel: {pace: 'fast', horizontal: false},
numberCell: { show: false },
flexHeight:true,
flexWidth:true,
sortable:true,
columnBorders:false,
editable: true,
editModel: {clicksToEdit: 1, saveKey: 13},
sortable:true
});