pdfExport

Fired when the user clicks the "Export to PDF" toolbar button.

Event Data

e.sender kendo.ui.TreeList

The widget instance which fired the event.

e.preventDefault Function

If invoked the treelist will not save the generated file.

e.promise Promise

A promise that will be resolved when the export completes.

Example - subscribe to the "pdfExport" event during initialization

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    toolbar: ["pdf"],
    columns: [
      { field: "Name" },
      { field: "Position" }
    ],
    dataSource: [
      { id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
      { id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
    ],
    pdfExport: function(e) {
      console.log("exporting PDF");
    }
  });
  var treelist = $("#treeList").data("kendoTreeList");
  treelist.saveAsPDF();
</script>

Example - subscribe to the "pdfExport" event after initialization

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    toolbar: ["pdf"],
    columns: [
      { field: "Name" },
      { field: "Position" }
    ],
    dataSource: [
      { id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
      { id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
    ],
  });
  var treelist = $("#treeList").data("kendoTreeList");
  treelist.bind("pdfExport", function(e) {
    console.log("exporting pdf");
  });
  treelist.saveAsPDF();
</script>
In this article
Not finding the help you need?