Freeze Columns not working for export

2 posts, 0 answers
  1. Shahid
    Shahid avatar
    7 posts
    Member since:
    May 2015

    Posted 08 Jun 2015 Link to this post

    Columns are not locked in Export to Excel is their any possibility ?

    Column A "First Name" is locked and working fine on treelist but when i export the treelist the "First Name" Column is not freeze perfectly  

     http://dojo.telerik.com/EgoCa

  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 10 Jun 2015 Link to this post

    Hello Shahid,

    Freezing columns and rows in the exported Excel file can be achieved if you set the freezePane property of the generated workbook.

    The tricky part is to calculate how many columns you need to freeze, because the first "column" in the exported file actually consists of many columns, depending on the hierarchy in the widget.

    $("#treelist").kendoTreeList({
        excelExport: function (e) {
            e.workbook.sheets[0].freezePane = { colSplit: e.workbook.sheets[0].columns.length - e.sender.columns.length + 1, rowSplit: 1 };
        }
    });


    Please refer to the documentation for details.

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

    http://docs.telerik.com/kendo-ui/framework/excel/freeze-pane

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top