devextreme组装数据导出excel
$.get("", function (grid_dataSource) {
var grid_config = dxConfig.grid(grid_dataSource);
grid_config.columns = _obj.columns;
grid_config.export = { fileName: _obj.fileName }
grid_config.onExporting = function (e) {
e.component.beginUpdate();
expandAll(e.component);
};
grid_config.onExported = function (e) {
collapsAll(e.component);
e.component.endUpdate();
};
var grid_instance = E("Grid__" + _obj.id).hide().dxDataGrid(grid_config).dxDataGrid("instance");
setTimeout(function () { grid_instance.exportToExcel(); }, 1000);
})