I have a detailTemplate in KendoGrid. That detailTemplate again contains Grid. I want to get the modified dataSource of the detailTemplate Kendo Grid. How can I get that ? Here is my Code.
$("#grid").kendoGrid({
dataSource: dataSource,
detailTemplate: kendo.template($("#template").html()),
detailInit: detailInit,
dataBound: function () {
},
columns: [
{ field: "Id", hidden: true },
{ field: "Name", title: "Name" }
]
});
<script type="text/x-kendo-template" id="template">
<div class="SiteGrid" id="#: Id #">
</div>
</script>
function detailInit(e) {
var detailRow = e.detailRow;
detailRow.find(".SiteGrid").kendoGrid({
dataSource: dataSource,
columns: [
{ field: "Id", hidden: true },
{ field: "Name", title: "Name", width: 350 }
]
});
}
$("#grid").kendoGrid({
dataSource: dataSource,
detailTemplate: kendo.template($("#template").html()),
detailInit: detailInit,
dataBound: function () {
},
columns: [
{ field: "Id", hidden: true },
{ field: "Name", title: "Name" }
]
});
<script type="text/x-kendo-template" id="template">
<div class="SiteGrid" id="#: Id #">
</div>
</script>
function detailInit(e) {
var detailRow = e.detailRow;
detailRow.find(".SiteGrid").kendoGrid({
dataSource: dataSource,
columns: [
{ field: "Id", hidden: true },
{ field: "Name", title: "Name", width: 350 }
]
});
}