Hello, in my template is required to display pagination separately from the CGridView. I did this this way , but now the pagination works without ajax, the question is how to fix the jquery handler for the paginator? or how to solve this problem? :)

    1 answer 1

    1. find the jquery.yiigridview.js file - it is in the assets folder of the CGridView widget.
    2. there we are looking for methods that we can use - on a quick look

      $ .fn.yiiGridView.update = function (id, options) {$ ('#' + id) .yiiGridView ('update', options);

    This campaign is what you need.

    1. On the paginator's buttons we hang our functions on onClick events - so that the request does not go to the server. In short, the function should transfer paginatroa variables (page, number per page, etc.) to $ .fn.yiiGridView.update.

    something like this

    • Just noticed the native solution 'updateSelector' => '# yw1 li a', everything works, but the pagination does not change the classes, i.e. clicked on the 2nd page, and the active class should hang on this number - but it does not hang: ( - dogmar
    • it turns out that it should be:) - dogmar
    • @dogmar so the issue is resolved or not resolved? If resolved, mark the correct answer / add the correct answer and mark it. To close the question - Alexey Shimansky