在剑道组合框中动态添加项目 [英] 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.
供参考 - JSBIN
剑道链接 - 这里
提前致谢.
推荐答案
您可能知道,有两种方法可以创建组合框(选择和输入).我无法使用 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" });
这篇关于在剑道组合框中动态添加项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文