ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: emontes on April 20, 2016, 06:28:12 pm

Title: pq_curpage with other name for Apigility
Post by: emontes on April 20, 2016, 06:28:12 pm
I'm using apigility with pqGrid, but when I send the current page pqGrid send it as pq_curpage and apigility expects this parameter to be called only "page".

Is there a way to rename this pq_page to page?
Title: Re: pq_curpage with other name for Apigility
Post by: paramvir on April 20, 2016, 10:19:58 pm
The parameters send by grid can be changed / renamed in dataModel.beforeSend callback.

Code: [Select]
beforeSend: function(a, b){

if(b.type == "POST"){
b.data = b.data.replace("pq_curpage", "page");
}
else{
b.url = b.url.replace("pq_curpage", "page");
}
},

http://paramquery.com/pro/api#option-dataModel-beforeSend