Export the Grid to Excel after Confirmation
Environment
Product | Progress® Kendo UI® Grid for JSP |
Operating System | Windows 8 64bit |
Browser | IE |
Browser Version | 11 |
Description
How can I implement a custom Yes or No confirmation message to the user on clicking the Export to Excel button where Yes exports the Grid and No cancels the task?
Suggested Workarounds
The Kendo UI Grid does not provide a built-in solution for achieving this behavior. However, you can still work around the issue.
Apply custom logic on the excelExport
event of the Grid. For more information, refer to:
-
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid\/events/excelexport
-
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid\/methods/saveasexcel
This Dojo example demonstrates the full implementation of the scenario. The used approach exports the file when the user confirms the action and prevents the default behavior when the user clicks Cancel.