We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exporting to Excel - Documentation is incomplete

Thread ID:

Created:

Updated:

Platform:

Replies:

150600 Jan 13,2020 10:50 AM UTC Jan 14,2020 11:46 AM UTC React - EJ 2 1
loading
Tags: Grid
Matteo
Asked On January 13, 2020 10:50 AM UTC

Grid Excel export toolbar on click method:
public toolbarClick = (args: ClickEventArgs) => {
    if (this.grid && args.item.id === 'grid_excelexport') {
        this.grid.excelExport();
    }
  }

This was taken from the documentation, except that, args.item.id is 'grid_excelexport' only if the grid id is "grid", if I don't set grid ID or in the case of a child grid, the grid ID is dynamic and it is not possible to intercept the call.


Prasanna Kumar Viswanathan [Syncfusion]
Replied On January 14, 2020 11:46 AM UTC

Hi Matteo, 
 
Thanks for contacting Syncfusion support. 
 
In toolbarClick event we suggest you ensure with text value for Excel, PDF and Word Exporting. For more information, please refer the below code example: 
 
 
toolbarClick(args) { 
        switch (args.item.text) { 
            case 'PDF Export': 
                this.gridInstance.pdfExport(); 
                break; 
            case 'Excel Export': 
                this.gridInstance.excelExport(); 
                break; 
            case 'CSV Export': 
                this.gridInstance.csvExport(); 
                break; 
        } 
    } 
 
 
Regards, 
Prasanna Kumar N.S.V 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon