I am still very new to yii1 and fight now with a GridView. I have build a Search Form and when sending of the form, the page gets re-loaded and the GridView shows up with the results. The form goes to the Controller action and gets the appropriate records.
That works well, besides Pagination. As soon I click on the next page, the GridView is empty, if I refresh the Page, the GridView shows the results for that page. What am I doing wrong here? I have printed out the $dataProvider in my view and it seems to hold all the data, but the table shows no records. Any hint what I am doing wrong? I really hope someone can help. Thank you so much !
Unfortunately, my problem with the pagination is still not solved, so I am wondering if anyone here got any more ideas.
Please see a few more information from my controller and Model:
$newArticles = $articles->searchArticles();
// below needs to be done since it gets combined with articles from another section
$allArticles = array_intersect($prevArticles,$newArticles );
$criteria = new CDbCriteria;
$dataProvider = new CActiveDataProvider('MyModel', array(
public function searchArticles()
// GET THE ARTICLES FROM THE DB....
return array('criteria' => $criteria, 'sort' => $sort);