Dynamically open nested grid record

When a record in a nested grid is edited then saved, the parent grid is refreshed, and all open nested grid records are collapsed.

I would like to store the ID of the relevant record that was expanded and after the update of the nested record, dynamically reopen that nested grid record.

Is there any way to do this?