How can I add a new item in a Kendo DropDownlist, if it doesn't exist in the datasource?
Example: the Kendo DropDownlist shows some predefined values, but the user should also be able to add a new item by writing in an input text.
How can I add a new item in a Kendo DropDownlist, if it doesn't exist in the datasource?
Example: the Kendo DropDownlist shows some predefined values, but the user should also be able to add a new item by writing in an input text.
Share Improve this question edited Oct 21, 2015 at 22:54 Nic 12.9k20 gold badges84 silver badges106 bronze badges asked Apr 4, 2015 at 10:25 TomTom 4,10725 gold badges72 silver badges107 bronze badges1 Answer
Reset to default 3You can use the add()
method of the Kendo datasource
to add new items:
var ddl = $("#dropDownListID").data("kendoDropDownList");
var dataSource = ddl.dataSource.add({
"text": "new Item",
"value": 1000});