如何在Kendo angularjs的树状视图中使用下拉菜单

时间:2018-09-12 06:45:23

标签: angularjs kendo-treeview kendo-dropdown

我想有两列:一列是树视图,另一列是下拉列表。 树的每个节点都有一个选项列表,该列表是一个下拉列表。 这是我的数据:

 $scope.organizationChartTreeData = new kendo.data.HierarchicalDataSource({
            data: MakeComponentDataTree()
        });
 $scope.MakeComponentDataTree = function (treedata) {
    nodeList = treeData.filter(function (x) { return x.ParentId == null })
        .map(function (m) {
            return {
                Id: m.Id,
                ParentId: m.ParentId,
                text: m.Name,
                items: [],
                selectOptions: {
                    placeholder: "Name",
                    dataTextField: "FullName",
                    dataValueField: "Id",
                    valuePrimitive: true,
                    autoBind: false,
                    dataSource: m.Users
                }
            }
        });

这是html:

<div class="col-lg-12" kendo-tree-view="tree" k-data- 
source="organizationChartTreeData" k-options="treeOptions">                    
<span class="col-lg-6" k-template>
<select kendo-multi-select k-options="organizationChartTreeData.data" k-ng- 
model="users"></select>
                </span>
</div>

我使用了递归函数并构建了一棵树,但是我不知道如何绑定kendo-multi-select中的k选项可以使用的数据。

.Item1                     DropDownList1
.Item2                     DropDownList2
    .SubItem2.1            DropDownList2.1
    .SubItem2.2            DropDownList2.2
.Item3                     DropDownList3
   .SubItem3.1            DropDownList3.2
   .SubItem3.2            DropDownList3.2
.Item4                     DropDownList4
.Item5                     DropDownList5
...

0 个答案:

没有答案
相关问题