SMART datagrid v.1 > Classes > GridExportOptions

[ grids ver.1.3.5]   Back  Forward

DataLudi.GridExportOptions.onStart  property

asynctrue时,将会被调用在开始导出的时点的回调函数。 

function (grid:GridBase);    

如果将showProgress指定为true,即使没有使用回调,也就自动显示表示进展状态的进度条。 

默认值为null.

Getter
function onStart(): Function
Setter
function setOnStart(value: Function)
Code -1
    $('#export').click(function () {
        new DataLudi.exportToExcel(grdMain, {
            target: "local",
            fileName: "dlgrid.xlsx",
            async: true,
            onStart: function (grid) {
                grid.showProgress('Excel导出...');
            },
            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);
                }
            }
        });
    });
See Also
onProgress
onFinished
async
showProgress
title
GridExcelExporter
exportToExcel
GridBase
Examples
Excel异步导出