SMART datagrid v.1 > Classes > GridExportOptions
Progress callback function which is called in each point of converting grid contents to Excel when async is true.
current is the progress rate between 0 ~ 100, and elapsed is the elapsed time value in milliseconds. In addition, message displays the contents of being proceeded.
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);
}
}
});
});