Pjax container in reloaded div

Hi there!

I have code with structure like this:




<div id="wrapper">

...

...

[pjax container]

grid

[/pjax container]

...

...

</div>



So the problem is: when I load #wrapper via ajax/pjax (for now let’s take ajax case) first time - all works perfect. But when i reload this div second (and another) time - grid pjax pagination does not work anymore. It makes ajax requests and got info, but grid does not updated.

What have I missed?

P.S. yii version: 2.0.11.2, php version: 7.0.12.

You should wrap all the content

What do u mean? Wrap all content with pjax container? But i need to update this parts of page separately. Actually page structure is more complicated, it’s just an simple example than describes main problem.