Adding an item dynamically in kendo combobox

12,621

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.

Share:
12,621

Related videos on Youtube

Ashwin
Author by

Ashwin

Updated on June 04, 2022

Comments

  • Ashwin
    Ashwin about 2 years

    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.

  • Ashwin
    Ashwin almost 12 years
    Great !! Thanks. I will use your solution. I don't mind changing <select> to <input>.
  • Michele
    Michele over 5 years
    This code doesn't work correctly in 2018. I should use upper case for "text" and "value": $("#comboBox").data("kendoComboBox").dataSource.add({ Text: "Five", Value: "5" });