Kendo Grid export to excel + Enhanced Textbox content

2 posts, 0 answers
  1. keyur
    keyur avatar
    1 posts
    Member since:
    Nov 2016

    Posted 08 Nov Link to this post

    Hi,

    I am binding Kendo Grid with SharePoint Rest Api. The SharePoint List contains a Column that facilitates rich textbox features(formatting features). While displaying content on Kendo Grid i have set "encoded : false" property, this makes it perfect in grid. But when i try to export content to excel it exports html tags into excel. Can any one help me with this?

    thanks in advance.

     

  2. Stefan
    Admin
    Stefan avatar
    265 posts

    Posted 09 Nov Link to this post

    Hello Keyur,

    The described result is expected, as the Grid is making modifications on its td elements in order to show the unencoded data, but the data itself is not modified.

    When the Grid is exported to Excel, we actually export the Grid data which in this scenarios is a string containing HTML tags.

    I can suggest using the excelExport event of the Grid to modify the data which will be exported to Excel.

    http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-excelExport

    I made a Dojo example demonstrating how to access all of the cells in a specific column and set them a new value:

    http://dojo.telerik.com/uPAtO

    I hope this will help you to achieve the desired result.

    Regards,
    Stefan
    Telerik by Progress
     
    Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
     
  3. Kendo UI is VS 2017 Ready
Back to Top