pdfExport

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

Event Data

e.sender kendo.ui.PivotGridV2

The widget instance which fired the event.

e.preventDefault Function

If invoked the grid 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="pivotgrid"></div>
<script>
$("#pivotgrid").kendoPivotGridV2({
    pdfExport: function(e) {
        alert("PDF export");
    },
    height: 550,
    dataSource: {
        type: "xmla",
        columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
        rows: [{ name: "[Product].[Product]" }],
        measures: ["[Measures].[Internet Sales Amount]"],
        transport: {
            connection: {
                catalog: "Adventure Works DW 2008R2",
                cube: "Adventure Works"
            },
            read: 'https://demos.telerik.com/olap/msmdpump.dll'
        }
    }
});
var pivotgrid = $("#pivotgrid").data("kendoPivotGridV2");
pivotgrid.saveAsPDF();
</script>

Example - subscribe to the "pdfExport" event after initialization

<div id="pivotgrid"></div>
<script>
$("#pivotgrid").kendoPivotGridV2({
    height: 550,
    dataSource: {
        type: "xmla",
        columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
        rows: [{ name: "[Product].[Product]" }],
        measures: ["[Measures].[Internet Sales Amount]"],
        transport: {
            connection: {
                catalog: "Adventure Works DW 2008R2",
                cube: "Adventure Works"
            },
            read: 'https://demos.telerik.com/olap/msmdpump.dll'
        }
    }
});
var pivotgrid = $("#pivotgrid").data("kendoPivotGridV2");
pivotgrid.bind("pdfExport", function(e) {
    alert("PDF export");
});
pivotgrid.saveAsPDF();
</script>
In this article