Hi,
can We change the name of "Excel Export" to "xlsx Download" and default icon to custom xls icon ?
Hi Pawan,
Thanks for your update
You can achieve this requirement of customizing the Excel Export content by modifying the corresponding locale value in the Grid’s load event as demonstrated in the below code snippet and sample,
// Grid's load event handler onLoad() { (this.grid.localeObj as any).localeStrings.Excelexport = 'xlsx Download'; } |
Sample: https://stackblitz.com/edit/angular-tce5w1?file=app.component.html,app.component.ts
API: https://ej2.syncfusion.com/angular/documentation/api/grid/#load
Regards,
Rajapandi R
Hi Rajapandi R,
Thank you for the reply, But what about Default Icon. I want my custom Icon in the place of default Icon. can you please help me in this also.
Thanks.
Regards,
Pawan
Hi Pawan,
Thanks for the update
You can achieve your requirement by using the Custom toolbar items and also like to display the custom Toolbar icon. Actions for this customized toolbar items are defined in the toolbarClick event, and you can display the icon by defining the respective CSS content. Please refer the below code example, sample and documentation for more information.
App.component.ts
public ngOnInit(): void { this.data = employeeDetails; this.toolbar = [{ text: 'Xlsx Download', tooltipText: 'xlsx Download', prefixIcon: 'e-custom', id: 'expandall' }]; this.pageSettings = { pageCount: 5 }; } toolbarClick(args: ClickEventArgs): void { switch (args.item.text) { case 'Xlsx Download': this.grid.excelExport(); break; } } |
Index.html
<Style> .e-custom:before { content: "\e726"; } </style>
|
You can use custom icons as you want by defining the respective CSS content. Please refer the below documentation for more information.
Icons: https://ej2.syncfusion.com/documentation/appearance/icons/#material
Documentation: https://ej2.syncfusion.com/angular/documentation/grid/tool-bar/tool-bar-items/#custom-toolbar-items
Regards,
Rajapandi R
Hi Team,
When my datasource contains fileupload element then, I can't able to export the excel export
Naveen,
In your query you have mentioned that “my datasource contains fileupload element”, we need more information for our clarification. So, before we start providing solution on your query, please share the below details that would be helpful for us to provide better solution.
1)
Since your datasource contains file upload
element, please share your datasource structure we would like to check how you
are having fileupload element in your datasource.
2) Share your complete Grid rendering code, we would like to check how you are displaying the file upload element in the Grid.
3) Please share your exact requirement with detailed description.
4) Please confirm you like to export the file upload element to the Excel document or not. If not what you like to export in the Excel document.
5) Share your problem scenario in video demonstration.
Regards,
Rajapandi R