How to define the paperSize in the onPDFExport function? Currently getting the error unknown paperSize. Variable width is the total width of all of the columns in the grid, and it is not undefined.
Current code:
function onPDFExport(e) {
var grid = $("#CustomerOrderYearlyAllGrid").data("kendoGrid");
var width = 0;
for (var i = 0; i < this.columns.length; i++) {
this.autoFitColumn(i);
width = width + this.columns[i].width;
}
debugger;
var CustomerID = $("#CustomerID").data('kendoDropDownList');
var selectedCustomerName = CustomerID.text();
grid.options.pdf.fileName = selectedCustomerName + " Summary (Yearly).pdf";
grid.options.pdf.paperSize = (width + "px","500px");
}