New to Kendo UI for jQueryStart a free 30-day trial

PdfExport

events

Fires 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.

<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) {
/* The result can be observed in the DevTools(F12) console of the browser. */
      console.log("exporting PDF");
    }
  });
  var treelist = $("#treeList").data("kendoTreeList");
  treelist.saveAsPDF();
</script>
<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) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("exporting pdf");
  });
  treelist.saveAsPDF();
</script>
Not finding the help you need?
Contact Support