Adding an item dynamically in kendo combobox

2019-06-16 09:33发布

问题:

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.