Grid Export Bug - Export to Excel loading indicator doesn't go away when canceling the export in JS

1 Answer 109 Views
Grid
Karen
Top achievements
Rank 1
Karen asked on 13 Nov 2024, 05:03 PM

Hi,

The Kendo version Kendo UI for jQuery 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).

1 Answer, 1 is accepted

Sort by
1
Eyup
Telerik team
answered on 13 Nov 2024, 09:57 PM

Hello Karen,

 

Thank you for reporting this.

I will log this bug to our system and grant you Telerik Points as a token of appreciation for bringing it to our attention.

You can use the following alternative solution:

<script>
    function dataBound(e){
        if(true){ // data is 0
           $(".k-grid-excel").addClass("k-disabled");
        }
    }
</script>
Here is a live sample I've prepared for demonstration:
https://netcorerepl.telerik.com/myFlPxcv57G9CLP123

Do you find this assistance helpful? Let me know what you think.

 

Regards,
Eyup
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Karen
Top achievements
Rank 1
commented on 19 Nov 2024, 03:19 PM

Eyup,

That is helpful and will do as a workaround for now! Thank you for your timely response!

Tags
Grid
Asked by
Karen
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or