Export Kendo Grid to PDF

0

I have a function that exports to Excel and I need another one that I export to PDF. The function should export the data of 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();
}
    
asked by anonymous 27.09.2016 / 14:42

1 answer

0

Found the solution in the Stack Overflow question . It solves the export problem, but I have identified that for my case, it is better to export only to Excel.

    
27.09.2016 / 15:32