ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: jeeva on June 07, 2017, 01:15:07 pm
-
Dear Support,
I am using remote pagination.
pageModel: { type:'remote',rPP: 50,rPPOptions:[50,100,200,300,500]},
when I am in last page and trying to change records per page drop down as 500.Its Sending pq_curpage=4&pq_rpp=500&_=1496820976665"
Its returning no data found.but its having 300 records
pq_curpage=4 should be 1, then only can get all the data in grid.Can you please help me to fix this.
thanks
jeeva
-
Please use this logic in the remote script to correct the number of skipped records.
int skip = (pq_rpp * (pq_curpage - 1));
if (skip >= total_Records)
{
pq_curpage = (int)Math.ceil(((double)total_Records) / pq_rpp);
skip = (pq_rpp * (pq_curpage - 1));
}
as shown in this example for remote paging: https://paramquery.com/pro/demos/paging