SMART datagrid v.1 > Classes > GridExportOptions
Callback function which is called at the point of committing exporting when async is true.
If an error occurs in the state of not committing exporting, an exception will be transferred to error parameter. elapsed is the progress time value in milliseconds.
If specify showProgress as true, even if do not use callback, it will automatically display the progress bar of indicating the progress state.
Defaults to null.
$('#export').click(function () {
new DataLudi.exportToExcel(grdMain, {
target: "local",
fileName: "dlgrid.xlsx",
async: true,
onStart: function (grid) {
grid.showProgress('Excel exporting...');
},
onProgress: function (grid, current, elapsed, message) {
grid.setProgress(0, 100, current, message + ' in ' + elapsed.toLocaleString());
},
onFinished: function (grid, error, elapsed) {
grid.closeProgress();
if (err) {
alert('Export failed: ' + err);
}
}
});
});