Adding an item dynamically in kendo combobox

若如初见. 提交于 2019-12-23 07:35:18

问题


If anyone of you have used kendo ui than can you please let me know how to add a new item dynamically in kendo combobox.

I have tried searching on google and everywhere and my conclusion is that there is no such feature in kendo.

For reference - JSBIN

kendo link - here

Thanks in advance.


回答1:


As you probably know, there are two way to create a combobox (select and input). I was not able to add a new item dynamically using select (like your example). However, using the input and databinding, it is simple.

$("#comboBox").data("kendoComboBox").dataSource.add({ text: "Five", value: "5" });

JSBIN example 1. JSBIN example 2.



来源:https://stackoverflow.com/questions/11261113/adding-an-item-dynamically-in-kendo-combobox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!