It's necessary to perform the following steps to accomplish this task:
1) Hide built-in command buttons using the CommandButtonInitialize event and create custom ones;
2) Handle the client-side DetailRowCollapsing , DetailRowExpanding events to track what detail grids are currently expanded;
3) Use the master grid's custom callback (the client-side PerformCallback method) to update all grids simultaneously on the server side;
4) Use the BatchEditConfirmShowing event to avoid losing changes in detail grids on an external callback;
5) Handle the server-side CustomCallback event to get all detail grids using the FindDetailRowTemplateControl method and update them using the UpdateEdit method.
The attached example illustrates how to implement all these steps.