This seems to be an old problem, but I can’t find a clear solution.
What I need is:
The yii ajax that is used for CGridView sorting/filtering/paging, must not only update the gridview, but also the parent div containing the gridview (and other gridviews in the same div). This is not working, even if you render the whole form in the controller.
From the forums, it looks like the problem is with $(data).find(’#’+this) in jquery.yiigridview.js.
Does anybody know of a solution without changing the yii files?
Maybe I haven’t understood your problem or what you want to achieve, but if you want to run any JS code upon sorting/filtering/paging, you just use the afterAjaxUpdate property, like this:
afterAjaxUpdate could work to update the other gridviews in the div, but it would result in more round trips.
I want to pass all the gridview’s to the view in one round trip. It works during page refresh, but not during gridview sorting/filtering/paging because then only the gridview on which the sorting is performed gets refreshed.
So I want the whole page refreshed OR preferably the div containing the gridviews refreshed, when a gridview is sorted/filtered/paged.