Column Title containing '#' prevents excel export

5 posts, 0 answers
  1. Alex
    Alex avatar
    76 posts
    Member since:
    May 2015

    Posted 26 Jul 2018 Link to this post

    If the "title" of a column contains a '#' such as "Workorder #", when trying to export to excel, no error will be thrown but the prompt for saving the file never appears and and the excelExport event is not ever fired either. Is this a known bug? Can you reproduce it on your side?
  2. Alex
    Alex avatar
    76 posts
    Member since:
    May 2015

    Posted 27 Jul 2018 Link to this post

    Also, if it's in the header template, same issue
  3. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2495 posts

    Posted 30 Jul 2018 Link to this post

    Hello Alex,

    I tried to replicate the described behavior, however, I was not able to. Please check out the dojo below that I used for testing and let me know if I am missing something.


    It would be great if you can modify the sample in a way that the issue is replicated and send it back. This will enable us to examine the behavior and look for its cause.


    Regards,
    Viktor Tachev
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. Alex
    Alex avatar
    76 posts
    Member since:
    May 2015

    Posted 31 Jul 2018 in reply to Viktor Tachev Link to this post

    SO the issue is mostly my fault: The "groupHeaderTemplate" template is malformed (i.e. the '#' is not properly escaped). I can fix the issue easily just be properly escaping it "##", but still no error was given that it was malformed. Can the code be updated to throw an error or somehow alert the user that the template is bad and needs to be fixed?

     

    https://dojo.telerik.com/IFOCameV/2

  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2495 posts

    Posted 02 Aug 2018 Link to this post

    Hi Alex,

    When using hash literals inside a template they must be escaped in order to avoid errors. If the characters are not escaped an "Invalid template" exception will be thrown. 

    Make sure that the header template is defined like below and it would work as expected.

    groupHeaderTemplate: "wo \\#"

    For reference I also updated the dojo sample. Check it out below and let me know how it works for you.




    Regards,
    Viktor Tachev
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top