Hi, how can i export grid to pdf with multiple pages without setting pageSize. My grid has 400 rows.
this is what i am using now
function exportPDF() { var grid = $("#MainGrid").data("kendoGrid"); var progress = $.Deferred(); grid.dataSource.pageSize(32); grid._drawPDF(progress) .then(function(root) { return kendo.drawing.exportPDF(root, { multiPage: true }); }) .done(function(dataURI) { kendo.saveAs({ fileName: "SP Orders_" + getCurrentDate() + ".pdf", dataURI: dataURI }); progress.resolve(); });
globControls.btnPdf.kendoButton({ click: function (e) { if (rowCount > 0) { exportPDF(); //set back pageSize// var dataSource = $(".k-grid").data("kendoGrid").dataSource;// dataSource.pageSize(dataSource.total()); // globControls.mainGrid.data("kendoGrid").saveAsPDF(); } else { e.preventDefault(); } } });