The solution is : (Taken from a post in the forum):
/*
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.
*/
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,
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.
}
}