How to display a kendo pattern inside another?

I have a popup kendo template for adding / editing. I need to display a list of products using the checkbox inside the list in this template. I found this link to create a list of views. How to use this inside another template.

**** Looking for something like this **** enter image description here

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!

+4
source share
2 answers

Implemented kendo-angular -template for the internal list. See here for an example http://demos.telerik.com/kendo-ui/listview/angular .

0
source

Source: https://habr.com/ru/post/1626081/


All Articles