samdark / yii2-cookbook

Yii 2.0 Community Cookbook
1.45k stars 296 forks source link

Using multiple gridviews + pagination #45

Closed samdark closed 8 years ago

samdark commented 9 years ago

In case of multiple paginated GridViews on the same page one should specify Pagination::$pageParam else pages of both grids will be changed.

mrsurname commented 8 years ago

What about now? How to solve such problem?

Is it a possible solution - in one page render index views of two controllers (e.x. users, posts). So request from every gridView will be sent to appropriate controller

cebe commented 8 years ago

this is already covered in the guide: http://www.yiiframework.com/doc-2.0/guide-output-data-widgets.html#multiple-gridviews-on-one-page

samdark commented 8 years ago

Thanks for pointing it out.

koredalin commented 7 years ago

Whatever I do by the guide - I have 3 GridViews. 1 Pagination (only for the last model). Only the last model GridView is updated. Is there a way that I have a pagination for each view? Thank you.

antonmarin commented 7 years ago

no pjax? have you tried changing your pagination attribute?

koredalin commented 7 years ago

I use pjax without any parameters. It starts before the three GridViews and ends after them. If I switch off the Pjax - there is no difference. I can provide some code..? https://gist.github.com/koredalin/66b7ea7b2ed94d391e740c715aaf7ae8

koredalin commented 7 years ago

Excuse me. I had no enough records in the Database. I'm sorry about the spam. Thank you - once again.