Master detail in grid add-edit-delete

I'm struggling connecting master detail without generating it from master/detail datagrid templates. My idea was in grid editing and creating dependent records.

The hirarchy is one to many: kmg-parcel-owner
The first issue was creating new parcel on existing kmg. If I want to pass a parameter to the "add parcel" page (the selected kmg_id), system complaints that it does not have the same signature for the "add parcel" page. The idea was that on the "add Parcel" page, parent kmg_id would be populated automaticaly. Basically it's an order/orderdetails concept although I guess I'm doing something wrong. Not sure how to bypass this.
The second issue is how to perform required add/edit/delete calls on child records (which is created from $expand template for dependant records). The "$event" seens to be capturing only top level select row (e.g. kmg). My understanding is to capture select row event and use its id to make calls. However here hierarchy is multilevel and I'm not sure if this is a good aproach.

kind regards, martin

You can check the code generate from our template and later try to replicate it in your own manually defined page. Here is for example how the child grid will pass relevant master data in our Sample Order -> OrderDetails: