Here is my code. When i am exporting, child rows are not getting exported. How to achieve this. Expecting your help.
<script type="text/javascript">
$(document).ready(function () {
$("#btnExportToExcel").click(function (e) {
var grid = $("#grid").data("kendoGrid");
grid.saveAsExcel();
});
});
</script>
<div id="grid"></div>
<button id="btnExportToExcel" type="submit" name="excel" value="valexcel">
<img src="images/excel-icon.png" alt="imageExcel" /></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>