ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: wmwa on May 11, 2015, 08:33:25 pm

Title: Retreive data from a row's detail grid
Post by: wmwa on May 11, 2015, 08:33:25 pm
Hello,

I'd like to know if there's a simple way to get the data from a nested detail grid pertaining to a parent grid's row. I'm trying to write my own function to export to an excel sheet, since the standard excel export seems to ignore the detail.
Title: Re: Retreive data from a row's detail grid
Post by: paramvir on May 11, 2015, 09:44:40 pm
Gven a rowData that would be:

rowData.pq_detail.child.pqGrid("option","dataModel").data

First you would need to ensure whether row has a detail.

var child = rowData.pq_detail.child;

if ( child ){ //row has detail
  var detail_grid_data = child.pqGrid("option","dataModel").data;
}