How can we use dropdown buttons to show export to excel and export to pdf options in grid's header? I'm not able to visualize how to use kendoGridExcelCommand and kendoGridPdfCommand in dropdown button.
1 Answer, 1 is accepted
0
Hetali
Telerik team
answered on 09 Oct 2023, 08:59 PM
| edited on 17 Oct 2023, 03:20 PM
Hello Abhijeet,
Yes, you can use the Kendo UI DropDownButton in the Grid's Toolbar to export to Excel and PDF. Instead of using the kendoGridExcelCommand and the kendoGridPdfCommand directive, use the saveAsExcel and the saveAsPDF method. For example:
I have demonstrated the above discussed approach in this StackBlitz example. Please give it a try and let me know if it helps or if I can further assist you.
To change the style or format of the data in the exported files and populate certain columns (exclude the action button columns), take a look at the following:
Additionally, to receive a faster turnaround in the future (within 24 hours for DevCraft Ultimate license), please open a Support Ticket instead of a Forum post.
What should i do to control the columns it shows in pdf/excel?
Or if i want to change the style/format of any data?
SaveAsPDF also includes a column which has a couple of action buttons, how can I exclude that column from getting populated in pdf?
Hetali
Telerik team
commented on 17 Oct 2023, 03:19 PM
Hi Abhijeet,
I have modified the above answer with the solution to export customized columns. Please give the discussed approach a try and let me know if I can further assist you.