This example demonstrates
exportData
method is called on the details grids.
This example uses 2 alternative ways of export:
We get the workbook from main grid by using grid.exportData({ format: 'wb' })
and iterate over its rows to get the corresponding detail grid data. We combine and save the rows from main grid and detail grid in a new rows
array.
exportFullXlsx
function, we create the detail grid if not created yet, export its data in 'wb' format and combine it with that of main gridexportXlsx
function, we just get the detailGrid Model of the detail grids without creating them and gather data directly from colModel and dataModel.data of detail grid
We get the js object from main grid by using grid.exportData({ format: 'js' })
and iterate over its rows to get the corresponding detail grid data. We combine and save the rows from main grid and detail grid in a new rows
array.
exportFulljs
function, we create the detail grid if not created yet, export its data in 'js' format and combine it with that of main gridexportjs
function, we just get the detailGrid Model of the detail grids without creating them and gather data directly from colModel and dataModel.data of detail grid Limitation: This example assumes local data of nested grids and doesn't work in case of lazy loading of nested grids.