K
K
Kurper2020-09-04 16:14:49
Yii
Kurper, 2020-09-04 16:14:49

How to make dynamic pagination in Yii2?

Hello! I have two tables, something like orders and milestones (OneToMany). I display the progress steps through the GridView:

orderNr | stageNr
    1   |    1
    1   |    2
    1   |    3
    1   |    4
    2   |    1
    2   |    2
...

Simple pagination where I specify pageSize works, but it separates the stages of one order into different pages, that is, order 1 can also be transferred to the next page, and this is understandable why. Is it possible to make it so that, for example, take 5 orders, get the number of stages of all five and dynamically enter into pageSize?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question