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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 20:18:22  来源:igfitidea点击:

How to clear the value of a kendo Combo Box

javascripthtmlkendo-uikendo-mobile

提问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.c​​om/api/web/combobox#events-cascade以及 value() 方法来实现您正在寻找的功能