Export flexgrid - spinning icon

Posted by: sravya_tamma on 17 July 2020, 4:54 pm EST

  • Posted 17 July 2020, 4:54 pm EST

    Hello,

    I’m trying to export a grid, which usually take around 50-60 secs. When i click the export button, exportGrid() gets triggered.

    In this function i’m setting a variable exporting = true, which will show the spinning icon on UI. And after download completes it sets back to false.

    Issue : On button click, variable is immediately set to true, but the spinning icon does not appear to be spinning. It take around 40 secs for it to appear and mainly it appears on the screen right before it downloads the file.

    How can i get this icon to spin immediately after the button click?

    exportGrid(grid) {
            this.exporting = true;
            wjcGridXls.FlexGridXlsxConverter.saveAsync(grid, {
                includeColumnHeaders: true,
                sheetName: 'metadata'
            }, 'metadata' + '.xlsx',  () => { // onSaved
              this.exporting = false;
            }, (reason) => { // onError
                console.log('The reason of save failure is ' + reason);
                this.error = reason;
                this.exporting = false;
            })
        }
    
    
     <div [hidden]="!exporting" class="spinner-load">
                    <mat-progress-spinner
                        class="example-margin"
                        [color]="color"
                        [mode]="mode"
                        [diameter]="40">
                    </mat-progress-spinner>
                    <span> Downloading ...</span>
                </div>
    
                <div [hidden]="exporting" class="loader"></div>
    
    
  • Posted 23 July 2020, 3:30 am EST

    Hi Sravya,

    I have replied to your query on the link below:

    https://www.grapecity.com/forums/wijmo/export-flexgrid---spinning

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels