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