SMART datagrid v.1 > Classes > GridExportOptions
Callback function which is called at the point of starting exporting when async is true.
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);
}
}
});
});