Reload Gridview script when use Pjax

Dear all,

I get a problem when use Gridview in a Pjax container (also other widgets which have theirs scripts).

This Gridview is nested in other Pjax container. (an outer Pjax which includes other elements, not pjax for only this Gridview).

When the parent Pjax container loads, all script of Gridview not work any more (such as sort, filter …).

This issue is made by, there is not any JS registered to page, when parent PJax load, (that load HTML only).

So, are there any way to re-registered Gridview when Pjax load?

In order to make this work again, I mush full reload page.

I know I am able to bind a script when Pjax complete event occurs ($(’#xyz’).on(‘pjax:complete’) …)

But I think I should not bind all Gridview scripts in that event. It is not good idea.

So how do you think about this issue? How to solve it?

Thank you so much!.