Next
Update
Prev
Excel Export
xlsx xls
Data Only

This sample demonstrates how to display Progress bar while exporting the grid data to the excel file.

function gridReadyHandler(id) {
  ...
  var exportProgressHandler = function(event) {
    var percent = Math.floor(event.bytesLoaded / event.bytesTotal * 100);
    progressBar.setProgress(percent, 100);
    progressBar.setLabel("Processing "+ percent + "%");
    if (percent == 100) {
      gridRoot.removeProgressBar();
      dataGrid.setEnabled(true);
    }
    
    var layoutCompleteHandler = function(event) {
      dataGrid = gridRoot.getDataGrid();
      
      dataGrid.addEventListener("exportSaveComplete", exportSaveCompleteHandler);
      dataGrid.addEventListener("exportSaveError", exportSaveCompleteHandler);
      dataGrid.addEventListener("cancel", exportUploadCancelHandler);
      dataGrid.addEventListener("progress", exportProgressHandler);
    }
    gridRoot.addEventListener("layoutComplete", layoutCompleteHandler);
}

© 2017 KoolChart. All rights reserved.