i have the following coding. I want to print this as it is in a button click ( with same color, styles etc..)
<div id="grid"></div>
<button id="btnprint" type="submit" name="excel" value="valexcel">Print</button>
<script> $("#grid").kendoGrid({ columns: [{ field: "productName" }, { field: "category" }, { field: "status" }, { field: "Comments" }], dataSource: { data: [{ productName: "Tea", category: "Beverages", status: "Open", "Comments": "" }, { productName: "Coffee", category: "Beverages", status: "Open", "Comments": "comment1" }, { productName: "Ham", category: "Food", status: "Open", "Comments": "" }, { productName: "Bread", category: "Food", status: "Open", "Comments": "" }, { productName: "Hammer", category: "Hardware", status: "Closed", "Comments": "Comment test" }, { productName: "Screw", category: "Hardware", status: "Open", "Comments": "commenting testing" }], group: { field: "category" } }, detailTemplate: "<div class='Comments'>",
detailInit: function (e) { e.detailRow.find(".Comments").html("<p>" + e.data.Comments + "</p>"); }, });</script>
I tried with the following link and cannot achieve this.
https://docs.telerik.com/kendo-ui/controls/data-management/grid/export/print-export
-- I can achieve this by converting this grid to pdf and print it. But i dont want to do it and want to print this directly
Expecting your help.