javascript 如何清除剑道组合框的值
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21184067/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to clear the value of a kendo Combo Box
提问by Chinthaka Devinda
I'm fairly new to kendo.I have a requirement to load child combo box data from parent combo box also while I change values it sholud clear the value of existing with child combo and fill with a relevant value.
我对剑道还很陌生。我还要求从父组合框加载子组合框数据,同时我更改值,它应该清除现有子组合的值并填充相关值。
if someone can guide me to achieve this that would be great.
如果有人能指导我实现这一目标,那就太好了。
Thanks
谢谢
Chinthaka
钦塔卡
回答by Rodney
You can set the value to the new value
您可以将值设置为新值
$("#combobox").data("kendoComboBox").value("Oranges");
Or clear it
或者清除它
$("#combobox").data("kendoComboBox").value("");
回答by knikolov
You can use the cascade event of the ComboBox - http://docs.kendoui.com/api/web/combobox#events-cascade, along with the value() method, to achieve the functionality that you are looking for
您可以使用 ComboBox 的级联事件 - http://docs.kendoui.com/api/web/combobox#events-cascade以及 value() 方法来实现您正在寻找的功能