Reference to a detail grid is stored in the corresponding rowData i.e., rowData.pq_detail.child holds a reference to the DOM of the child grid.
So to get all the child grids, you need to loop through all rowData of parent grid.
For example, you can use this to loop through the detail grids.
toolbar: {
items: [
{
type: 'button',
label: 'Loop through children',
listeners: [{
click: function(){
debugger;
var grid = $gridMain.data('pqGrid'), //instance of master grid.
data = grid.option('dataModel.data'); //data of master grid.
for(var i=0;i<data.length;i++){
var rd = data[i],
dt = rd.pq_detail,
child;
if(dt && dt.child){
//dt.child is reference to the DOM node of the child grid.
child = $(dt.child).data('pqGrid');//reference to instance of child grid.
var dataChild = child.option('dataModel.data');//data of child grid.
}
}
}
}]
}
]
},