Recent

Custom Controls Using Angular Material

Git Repo:  https://github.com/yawahang/ohcontrols Features DatePicker (Date Picker, Time Picker, Date Time Picker, and many more) RatingPicker (Vertical, Horizontal, Custom Icons) Select (Single Select, MultiSelect, Single Column, MultiColumn) Recursive Treeview

Export Kendo Chart as Grid

function exportChartToGrid(ds, name, colNames, title) {
// $("#main-content") replace with your main container id or can use class selector     var element = $("#main-content").find("#gridExport"); // append element only when not present
    if (element.length === 0) $("#main-content").append("<div style='display:none !important;' id='gridExport'></div>");
    // make dynamic clumn definations     var columnDefs = [];     var cols = colNames.split(",");     var colTitles = title.split(",");     for (var i = 0; i < cols.length; i++) {         columnDefs.push({ title: colTitles[i], field: cols[i] });     }
    $("#main-content").find("#gridExport").empty().kendoGrid({         dataSource: {             data: ds,             pageSize: 20         },         toolbar: ["excel"],         excel: {             fileName: name + "_Export" + ".xlsx",             allPages: true         },         columns: columnDefs     });
    $("#main-content").find("#gridExport").data("kendoGrid").saveAsExcel(); }

Comments

Top Posts

SQL Server Symmetric Key & Certificate based Encryption With AES_256 Algorithm

Kendo Grid Angular Column Width, minResizableWidth dynamic

Kendo Grid AutoFit Columns