Answer the question
In order to leave comments, you need to log in
How to keep Gridview sort order in YII2?
How to keep gridview sort order when moving from page to page? Particularly relevant is the sorting of applications by status, when viewing one, we return to the applications and again need to be sorted.
A trifle, but not pleasant. What is the most appropriate way to implement this? And if possible - poke your nose into an example.
Answer the question
In order to leave comments, you need to log in
Particularly relevant is the sorting of applications by status.
And everything is very clear to me, because. exactly the same situation happened.
Out of the box, sorting is done by passing the GET parameter sort. If, after sorting, you switch to a detailed view of the record, and then again to Grid / ListView, then the parameter is lost and, accordingly, sorting is performed by default, and not the one that was.
As a result, I would also like to know how to keep sorting after leaving the list page.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question