'VUE Syncfusion grid. PdfExport freeze browser when row are grouped by column

I'm using Syncfusion grid and it is awesome! I love it! But I have one problem when I try to export to PDF when my records are grouped by column the browser is frozen and I need to close the tab. CSVExport and ExcelExport works fine. I have column template, but the icons are not showed Someone have some suggestion?



Solution 1:[1]

The Grid excel and pdf export draws value on the exported document from the Grid data source and so it does not export template content by default. This is the default behavior of the Grid based on its current architecture.

However you can export images/icons for the template columns by setting its corresponding base64 string to the value property of the excelQueryCellInfo(Triggers for each cell before exporting to excel) and pdfQueryCellInfo(Triggers for each cell before exporting to pdf) events as demonstrated in the below code snippet.

// Grid’s excelQueryCellInfo and pdfQueryCellInfo event handlers
exportQueryCellInfo(args) {
 if (args.column.headerText === 'Employee Image') {
    if (args.name === "excelQueryCellInfo") {
        // Condition executes for the ‘Employee Image’ column on excel export
        args.image = { height: 75, base64: args.data["EmployeeImage"], width: 75 };
    } else {
        // Condition executes for the ‘Employee Image’ column on pdf export
        args.image = { base64: args.data["EmployeeImage"] };
    }
 }
},

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharman