Hi, I'm trying to show a grid inside a ListView. In order to do that I added a MVVM div data-role="grid" in the ListView template.
When the ListView is bound, everything is displayed correctly except the grid ( not rendered ). If I copy the same MVVM div inside the editTemplate, and click Edit at runtime, the grid is displayed in the editTemplate. Here and example of the code: ( as you can see both Template and EditTemplate have the same grid, but it's only displayed on EDITING mode )
<script type="text/x-kendo-tmpl" id="level-template">
<div class="hierarchy-view k-widget">
<dl>
<dt>Event</dt>
<dd>#: Description #</dd>
<dt>Escalation Time Seconds</dt>
<dd>#: EscalationTimeSeconds #</dd>
<dt>Subscriber</dt>
</dl>
<div data-role="grid" data-columns='["Subscriber.Name", "Subscriber.Description"]' data-bind="source: Subscriptions"></div>
<div class="edit-buttons">
<a class="k-button k-edit-button" href="\\#"><span class="k-icon k-edit"></span></a>
<a class="k-button k-delete-button" href="\\#"><span class="k-icon k-delete"></span></a>
</div>
</div>
</script>
<script type="text/x-kendo-tmpl" id="level-editTemplate">
<div class="hierarchy-view k-widget">
<dl>
<dt>Description</dt>
<dd>
<input type="text" class="k-textbox" data-bind="value:Description" name="EscalationHierarchyDescription" required="required" validationMessage="required" />
<span data-for="EscalationHierarchyDescription" class="k-invalid-msg"></span>
</dd>
<dt>Escalation Time Seconds</dt>
<dd>
<input type="text" data-bind="value:EscalationTimeSeconds" data-role="numerictextbox" data-type="number" name="EscalationHierarchyEscalationTimeSeconds" required="required" min="30" validationMessage="required" />
<span data-for="EscalationHierarchyEscalationTimeSeconds" class="k-invalid-msg"></span>
</dd>
<dt>Subscriber</dt>
</dl>
<div data-role="grid" data-columns='["Subscriber.Name", "Subscriber.Description"]' data-bind="source: Subscriptions"></div>
<div class="edit-buttons">
<a class="k-button k-update-button" href="\\#"><span class="k-icon k-update"></span></a>
<a class="k-button k-cancel-button" href="\\#"><span class="k-icon k-cancel"></span></a>
</div>
</div>
</script>
var listLevel = $("#lvLevel").kendoListView({
autoBind: false,
dataSource: dsEscalationHierarchy,
template: kendo.template($("#level-template").html()),
editTemplate: kendo.template($("#level-editTemplate").html()),
cancel: function(e) {
dsEscalationHierarchy.read();
},
remove: function (e) {
if (viewModel.EscalationHierarchy.length <= 1) {
e.preventDefault();
alert("At least one item is required");
}
}
}).data("kendoListView");