New to Kendo UI for jQuery? Start a free 30-day trial

PdfExport

events

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

Event Data

e.sender kendo.ui.Gantt

The widget instance which fired the event.

e.preventDefault Function

If invoked the gantt will not save the generated file.

e.promise Promise

A promise that will be resolved when the export completes.

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
    toolbar: ["pdf"],
    dataSource: [
        {
            id: 1,
            orderId: 0,
            parentId: null,
            title: "Task1",
            start: new Date("2014/6/17 9:00"),
            end: new Date("2014/6/17 11:00")
        }
    ],
    pdfExport: function(e) {
    }
});
var gantt = $("#gantt").data("kendoGantt");
gantt.saveAsPDF();
</script>
<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
    toolbar: ["pdf"],
    dataSource: [
        {
            id: 1,
            orderId: 0,
            parentId: null,
            title: "Task1",
            start: new Date("2014/6/17 9:00"),
            end: new Date("2014/6/17 11:00")
        }
    ]
});
var gantt = $("#gantt").data("kendoGantt");
gantt.bind("pdfExport", function(e) {
});
gantt.saveAsPDF();
</script>
Not finding the help you need?
Contact Support