Kevin
Give this link a try:
I kind of mangled your app, but mostly the htmx with multiple grids per page and with parent/child are working.
On the index page I'm displaying two grids, both deferred, using htmx. (I just saw that I left some code to build the grid in the index route, but it isn't used anywhere)
Both of the grids work and only rebuild the html for the grid, no full page refreshes.
If you click edit on the top grid you will see that it then loads another grid which has the 'child' records (I created a table called product_location that holds these child records). Once there, you have full CRUD capabilities on the child table while in edit mode on the parent table.
It just occurred to me that I didn't add enough records to test out paging. I will continue with that. One problem I am aware of but haven't addressed is if you go into edit mode on the product_location grid that the delete checkbox doesn't work. I have to dig in to that a little bit. I also may have messed up some filtering, need more testing. I didn't test column sorting either.
I'm not sure Massimo will accept a PR with what I've done. I'm using urllib to parse the url in the referer and I'm not sure that is how he would want it done. This will definitely need refactoring before considering for inclusion in to the main branch.
Oh, to try it out, extract the zip file and then move grid.py into py4web/utils/grid.py, assuming you have pulled the repo from github.
Let me know what you think and what else you run in to.
-Jim