BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi SF,
I have a Grid working in Angular with Firestore Data. All that is OK.
Using your code examples, I've tried to enable export to Excel and pdf, however, I am getting an error whereby, args.item.id throws an error.
Your Code from the examples:
toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'Grid_pdfexport') {
const selectedRecords = this.grid.getSelectedRecords();
const exportProperties = {
dataSource: selectedRecords
};
this.grid.pdfExport(exportProperties);
} else if (args.item.id === 'Grid_excelexport') {
const selectedRecords = this.grid.getSelectedRecords();
const exportProperties = {
dataSource: selectedRecords
};
this.grid.excelExport(exportProperties);
}
}
It would appear 'item' does not exist in ClickEventArgs. What is the correct method please?
Michael
Hi Michael,
Greetings from Syncfusion support
Based on your query we have prepared a sample and we tried to reproduce your reported problem at our end but it was unsuccessful. Please refer the below sample for your reference.
Sample: https://stackblitz.com/edit/angular-u44ygt?file=src%2Fapp.component.ts,src%2Fapp.component.html
If you still face the issue, please try to reproduce the issue with our above attached sample and share the issue scenario in video demonstration format.
Regards,
Rajapandi R
Hi Rajapandi,
Thanks for the Stackblitz sample.
The problem was ClickEventArgs in my code was coming from ej2-buttons. I replaced it with ej2-navigation as in the Stackblitz sample and it works fine.
Well done.
Michael
Hi Michael,
We are glad that the issue has been resolved. Please get back to us for further assistance.
We are marking this ticket as solved.