0
I have a function that exports to Excel and I need another one that exports to PDF. The function should export the data from a Kendo Grid.
function ExportarParaExcel(grid) {
grid = grid == undefined ? "#grid" : grid;
var grd = $(grid).data("kendoGrid");
grd.bind("excelExport", function (e) {
var rows = e.workbook.sheets[0].rows;
for (var ri = 0; ri < rows.length; ri++) {
var row = rows[ri];
var dd = '';
if (row.type == "group-header" || row.type == "header" || row.type == "group-footer" || row.type == "footer") {
for (var ci = 0; ci < row.cells.length; ci++) {
var cell = row.cells[ci];
if (cell.value) {
cell.value = ajustaAcentosXLS(cell.value);
}
}
}
}
});
grd.saveAsExcel();
}