3

我正在使用剑道 UI 开发 Web 应用程序,我需要向组合框添加自定义属性。

我怎样才能做到这一点?

4

1 回答 1

5

您可以使用 JQuery设置属性:

例子:

<input id="combobox" style="width: 100%"/>

$("#combobox").kendoComboBox({
    dataTextField: "text",
    dataValueField: "value",
    filter: "startswith",
    dataSource: data,
    dataBound: onDataBound
});

function onDataBound(e) {
    $("#combobox").closest(".k-combobox").attr("someAttr", "someValue");
};

这将导致:

属性

于 2015-06-25T04:30:26.667 回答