Yii Framework Forum: Pagination Error - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Pagination Error Rate Topic: -----

#1 User is offline   logos010 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 75
  • Joined: 12-November 10
  • Location:VietNam

Posted 01 June 2013 - 04:24 AM

Hi there,

I have a cgridview and a search form with dropdown list (month and year). It's worked well when I select month/year in search for. But an error appeared when I clicked onto the second page (Ex page 2) after that, the search form doesn't work anymore?

After checking, I saw the link in the paging always keep the previous value, it's seem not asset a new value when I choose from the search box!

Does anyone have the same issue?
0

#2 User is offline   logos010 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 75
  • Joined: 12-November 10
  • Location:VietNam

Posted 28 September 2013 - 05:56 AM

Hello,

I think I found the solution, hope it helpful for you.

In fact, the pagination is using ajax method to load data, therefore when I click next page, it will ajax load the controller again and the problem was here.

In the controller, I set params as $_POST, it is a terrible logic that I've met. To solve this issue, I change the method to $_REQUEST and every seem ok :)

Hope it helpful and save your time, if any solution is incorrect, please fix it, Thanks :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users