如何为KendoDropDownTreeView设置默认值

时间:2015-05-30 07:27:10

标签: kendo-ui

我正在使用kendodropdownTreeview在dropdownlist中显示树视图

var dropDownTreeView = $("#dropDownTreeView").kendoExtDropDownTreeView({
treeview: {
    dataSource: new kendo.data.HierarchicalDataSource({
        data: [
            {
                text: "Furniture", items: [
                  { text: "Tables & Chairs" },
                  { text: "Sofas" },
                  { text: "Occasional Furniture" }
                ]
            },
            {
                text: "Decor", items: [
                  { text: "Bed Linen" },
                  { text: "Curtains & Blinds" },
                  { text: "Carpets" }
                ]
            }
        ]
    })
}}).data("kendoExtDropDownTreeView");

我想设置默认选择值' Decor' ,我怎么能实现这个目标?

1 个答案:

答案 0 :(得分:0)

没有kendoExtDropDownTreeView组件,但我相信你在谈论TreeView。如果是这种情况,那么这似乎有效:

http://dojo.telerik.com/uVAYU