Hi Edson,
Greetings from Syncfusion.
To achieve your requirement we have used toolbar template feature of EJ2 Grid. In the attached sample we have added excel export and router link button in the toolbar. So, when you click the link button it will add “home” in the link and the Excel export button will export the grid as excel document.
Code Snippet:
app.component.html
<div class="control-section e-tab-section">
<div class="e-sample-resize-container">
<ejs-grid #grid [dataSource]='data' id='Grid' [allowExcelExport]='true'>
<ng-template #toolbarTemplate let-data>
<ejs-toolbar (clicked)='clickHandler($event)'>
<e-items>
<e-item id='routerlink' [routerLink]="['/home']" prefixIcon="e-edit" text="Link"> </e-item>
<e-item id='ExcelExport' prefixIcon='e-excelexport' text="Excel Export"></e-item>
</e-items>
</ejs-toolbar>
</ng-template> |
Please get back to us if you need further assistance.
Regards,
Ajith G.