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

Freeze Columns not working for export

1 Answer 93 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Shahid
Top achievements
Rank 2
Shahid asked on 08 Jun 2015, 11:42 AM

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

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 10 Jun 2015, 11:14 AM
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!
 
Tags
TreeList
Asked by
Shahid
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or