Author Topic: Retreive data from a row's detail grid  (Read 2318 times)

wmwa

  • Pro Economy
  • Newbie
  • *
  • Posts: 19
    • View Profile
Retreive data from a row's detail grid
« 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.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Retreive data from a row's detail grid
« Reply #1 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;
}
« Last Edit: May 11, 2015, 09:46:33 pm by paramquery »