Preventing excel export does not work #8058
Labels
Bug
C: Grid
F: Excel Export
FP: Unplanned
Sync status with associated Feedback Item
Regression
Broken functionality which was working previously
Description
Kendo UI for jQuery version 2024.2.514 (2024 Q2) appears to have introduced a new feature that shows a loading / progress overlay on the grid when you click the Export button.
Something we do in our grids is call e.preventDefault() if there is no data to export and the button is clicked. That appears to be the recommended approach to prevent an export based on the documentation here: https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/excelexport
While e.preventDefault() does prevent the export, the loading / progress overlay remains on the grid. Furthermore, simply hiding it with JS (e.g. grid.loader.hide() or grid.loaderOverlay.hide()) makes it go away, but the grid is in an unresponsive state (e.g. you can't sort rows or click Export again).
Workaround
You can use the following alternative solution which disables the Export Excel button depending on a condition:
Here is a live sample for demonstration:
https://netcorerepl.telerik.com/myFlPxcv57G9CLP123
The text was updated successfully, but these errors were encountered: