I've a kendo popup template for add/edit. I need to display a list of product with a check-box inside a list-view in that template.I found this link to create a list-view of check boxes. How do i use this inside another template.
****Looking for something like this****
Html
<script type="text/x-kendo-tmpl" id="myTemplate">
<div class="item click" value="#=ProductID#" data-bind="checked: isSelected">
<input type="checkbox" class="click" />
<span class="checkbox">#:ProductName#</span>
</div>
</script>
<!-- Kendo popup editor template -->
<script id="popup_editor" type="text/x-kendo-template">
<div style="width:700px">
<div style=" margin-left:100px">
<label for="Product">Products </label>
<div id="listView" class="k-listview" style="width:150px;height:250px;overflow-y:scroll;margin-top:10px">
</div>
</div>
</div>
</script>
script
$scope.productddlDataSource = new kendo.data.DataSource({
type: "json",
transport: {
read: "api/product"
}
});
$("#listView").kendoListView({
dataSource: $scope.productddlDataSource,
template: kendo.template($("#myTemplate").html())
});
//KENDO UI POP_UP
$scope.gridOptions = {
dataSource: $scope.data,
sortable: true,
filterable: true,
scrollable: false,
toolbar: [{ name: "create", text: "ADD Product" }],
editable: {
mode: "popup",
template: kendo.template($("#popup_editor").html()),
confirmation: true
},
...
.
.
Thanks in advance!
If you post some sample code showing what you're trying to do it would help. In general though, a template within a template is possible and I've done this in projects before. Here's an example directly from Telerik: http://www.telerik.com/forums/template-inside-template and another example: http://www.telerik.com/forums/nested-templates
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With