This is a migrated thread and some comments may be shown as answers.

Possible bug in Grid when exporting to Excel

4 Answers 408 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PaulH
Top achievements
Rank 1
PaulH asked on 22 Jun 2017, 10:35 AM

I have a reasonably complicated grid working really well with multiple level grouping on the latest version v2017.2.504. Within my grid I have 3 text columns and a number of numeric columns. The first 2 text columns are group levels and are hidden in the grid. The third text column is used to display the row details and also has a groupfootertemplate which displays the appropriate grouping total text as below: 

groupFooterTemplate: function (e) {
    if (e.PaidToDate.group === undefined) {
    }
    else {
        if (e.PaidToDate.group.field == "Category") {
            return "<span class='boldFont'>Total for " + e.PaidToDate.group.value + "</span>"
        }
        else {
            return "<span class='boldFont'>TOTAL " + e.PaidToDate.group.value + "</span>"
        }
    }
},

 

This works perfectly so when displaying the group footer at the category level it correct displays the "Total for ...." text and when displaying the group footer for the higher level heading field it displays the text "TOTAL ...". The problem comes when I attempt to export the grid to Excel. If I don't do the "e.PaidToDate.group === undefined" check the export fails and using developer tools to check the error it reports that it couldn't access the field property of undefined. Clkearly I've got round that error by doing the undefined check as above but this means that the Excel export gets the total rows but without the text description of what the total is. It looks like this must be a bug as it's clearly doing something different with the group footer when exporting to Excel - the symptoms are actually the same as what the grid did initially before I updated to the latest Kendo UI so is it possible that the handling of the grid footer template in the Excel export has not been updated in line with the grid itself? I made sure I updated all relevant Kendo scripts etc and the list included in the page are below:

<script language="javascript" type="text/javascript" src="/JSLibs/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="/JSLibs/js/kendo.all.min.js"></script>
<script language="javascript" type="text/javascript" src="/JSLibs/js/jszip.min.js"></script>
<link href="/JSLibs/css/kendo/kendo.common.min.css" rel="stylesheet"/>
<link href="/JSLibs/css/kendo/kendo.silver.min.css" rel="stylesheet"/>

 

Any suggestions?

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Jun 2017, 08:32 AM
Hello Paul,

This is a known issue which is already logged in our system:

https://github.com/telerik/kendo-ui-core/issues/3024

As a workaround, I can suggest using only the group.value variable (this will only access the value for the specific field).

Apologies for the inconvenience this may cause you.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
0
PaulH
Top achievements
Rank 1
answered on 26 Jun 2017, 09:40 AM

Hi Stefan

Thanks for the confirmation of that. I'll keep an eye on the issue and once there's a fix I'll go with that.

Regards

Paul.

0
PaulH
Top achievements
Rank 1
answered on 07 Jul 2017, 08:55 AM

Hi Stefan

I see from the issue log that it seems it has been fixed. Any idea when the fix will be released. I did download the very latest available early this week but that still had the same issue so I assume it's not yet included.

Regards

Paul.

0
Stefan
Telerik team
answered on 11 Jul 2017, 06:16 AM
Hello Paul,

I noticed that the issue is still open.

Once it is fixed, the issue will be closed, and the milestone field will be updated to show in which version the fix will be available.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Grid
Asked by
PaulH
Top achievements
Rank 1
Answers by
Stefan
Telerik team
PaulH
Top achievements
Rank 1
Share this question
or