Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding an item dynamically in kendo combobox

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.

like image 263
Ashwin Avatar asked Jun 29 '12 11:06

Ashwin


1 Answers

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.

like image 112
Daniel Avatar answered Sep 29 '22 13:09

Daniel