ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: Punit on July 06, 2022, 11:40:49 am
-
Dear Team,
Is there any way to add a loader while loading the excel file? if we upload a large file then it takes some time so we want to add a loader while uploading an excel file.
-
Loader can be shown by grid.showLoading(); and hidden by grid.hideLoading();
listener: function( evt ){
//import xlsx or csv file via HTML5 file input control.
var grid = this,
file = evt.target.files[0];//doesn't work in IE9.
if(file){
grid.showLoading();
//import first sheet of xlsx into workbook.
pq.excel.importXl( {file: file}, function( wb ){
grid = grid.Tab().main();//always import in main tab.
//import workbook into grid.
grid.importWb({workbook: wb, extraRows: 10, extraCols: 10});
grid.hideLoading();
})
}