Author Topic: PageModel-rPP  (Read 2212 times)

bsolTeamBglr

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 41
    • View Profile
PageModel-rPP
« on: July 26, 2017, 01:08:24 pm »
Hi,

I want to pass the value of rPP dynamically as per the total record present in pq grid.

in my grid ,i have 365 records.As per the total records ,i need to pass the rPPOption value like[10,20,30,(total of records present in my grid)].

is it possible to set the limit dynamically?

Thanks in advance!
« Last Edit: July 26, 2017, 01:10:06 pm by bsolTeamBglr »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: PageModel-rPP
« Reply #1 on: July 26, 2017, 01:32:33 pm »
Yes it can be set dynamically with option() followed by refresh.

Code: [Select]
  var len = grid.option("dataModel.data").length;
  grid.option("pageModel.rPPOptions",[10,20,100,len]);
  grid.refresh();
« Last Edit: July 26, 2017, 01:39:16 pm by paramquery »

bsolTeamBglr

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: PageModel-rPP
« Reply #2 on: July 28, 2017, 06:09:30 pm »
Hi,

Thank You.

Now its working fine. i have another doubt.

For example,my grid has 350 records. when i am giving the rPP maximum count per page is 500 means , pagemodel is automatically discarded from my grid.

can please help me on this.?

Thanks and Regards

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: PageModel-rPP
« Reply #3 on: July 28, 2017, 11:15:10 pm »
Please use option showBottom: true