yii2 gridview pjax event
Asked Answered
S

1

6

I would like to run a script after sort gridview where pjax is active. I could not find any event handler after reload of gridview. Is there any proper way of event handler after pjax call and refresh of gridview?

Silverts answered 28/12, 2015 at 9:42 Comment(0)
Z
13

Yii2 Pjax widget is just a wrapper of defunkt/jquery-pjax library, so you can view available events list in official Pjax docs in events section. Seems like you need to use pjax:success event:

$(document).on('pjax:success', function() {
    // Your code goes here ...
});
Zannini answered 28/12, 2015 at 10:26 Comment(1)
And a non jquery way?Dillman

© 2022 - 2024 — McMap. All rights reserved.