To create a sub grid in a grid expandable row (Modern Toolkit), you can extend the existing ‘RowExpander‘ plugin and override the ‘onGridTap’ method. This technique can be used to show FormPanel, Tree or some other custom ExtJs component in the expanded row body.

The code of the new plugin is the following:

And the global grid has the following configuration for the ‘rowexpandersubgrid’.

As you can see, afterSubGridRender(subGrid, record) is called only once on the first row body expansion. Also, you can easily implement other callbacks, i.e. to update data in the sub grid on every expand. I hope the code is not too complicated, and it will not take too much time to adjust it to your requirements.