I am working on web application using kendo UI and I need to add a custom attribute to combobox.
How can I do this?
You can use JQuery to set an attribute:
Example:
<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"); };
This will result in:
You can use JQuery to set an attribute:
Example:
This will result in: