如何在KendoDropDownList中使项目不可点击(项目将可见)

时间:2012-09-03 10:49:59

标签: javascript kendo-ui

var items = [ { Id: 0, Title: "Manager" }, { Id: 1, Title: "Developer" }, { Id: 2, Title:      "Vice President" } ];

$("#dropdownlist").kendoDropDownList({
dataSource: items,
dataTextField: "Title",
dataValueField: "Id"
});

现在我想要第0​​个项目(“经理”)不可点击。虽然这个项目可见。

任何帮助?

1 个答案:

答案 0 :(得分:0)

#dropdownlist :first-child{
    pointer-events: none;
}

_

element.onclick = function(event){
    event.stopPropagation();
    return false;
}