在kendo组合框中动态添加项目 [英] Adding an item dynamically in kendo combobox
本文介绍了在kendo组合框中动态添加项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果您有任何人使用kendo ui,请告诉我如何在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.
我试过在google上搜索
I have tried searching on google and everywhere and my conclusion is that there is no such feature in kendo.
作为参考 - JSBIN
kendo链接 - 这里
kendo link - here
提前感谢。
推荐答案
你可能知道,有两种方法来创建组合框(选择和输入)。我无法使用select(如您的示例)动态添加新项目。但是,使用输入和数据绑定,很简单。
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" });
这篇关于在kendo组合框中动态添加项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文