Possible bug in Grid when exporting to Excel

5 posts, 0 answers
  1. PaulH
    PaulH avatar
    70 posts
    Member since:
    Mar 2011

    Posted 22 Jun 2017 Link to this post

    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?

  2. Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 26 Jun 2017 Link to this post

    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 visualization (charts) and form elements.
  3. PaulH
    PaulH avatar
    70 posts
    Member since:
    Mar 2011

    Posted 26 Jun 2017 in reply to Stefan Link to this post

    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.

  4. PaulH
    PaulH avatar
    70 posts
    Member since:
    Mar 2011

    Posted 07 Jul 2017 in reply to Stefan Link to this post

    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.

  5. Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 11 Jul 2017 Link to this post

    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 visualization (charts) and form elements.
Back to Top