如何取消选中Ext.tree.TreePanel中的所有树节点?
我想要一个“重置”方法来取消选中 Ext.tree.TreePanel 中的所有选中节点。
I would like a 'reset' method to uncheck all the checked nodes in Ext.tree.TreePanel
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
正如在这里找到的:
http:// /www.sencha.com/forum/showthread.php?12888-solved-programatically-unchecking-checked-tree-nodes&p=62845#post62845
As found here:
http://www.sencha.com/forum/showthread.php?12888-solved-programatically-unchecking-checked-tree-nodes&p=62845#post62845
我找到了如下方法,但似乎“casecade”方法效果不佳,我需要多次调用“reset”来取消选中所有选中的子项:
I found a method as below, but seems the 'casecade' method do not worked well, I need call 'reset' several times to unchecked all the checked children:
我无法获得使用 Extjs 4.0.7 的其他答案。此外,使用“级联”方法会发出警告,表明该方法已被弃用。它建议使用“cascadeBy”代替。除了方法名称之外,我无法找到方法签名的差异(相同的参数,this,行为)。
但是,我找到了这段有效的代码:
感谢这篇文章:
http://www .sencha.com/forum/showthread.php?149627-Programmaticaly-check-uncheck-checkboxes-in-the-Tree-panel
I was unable to get either of the other answers to work with Extjs 4.0.7. Also, the use of the "cascade" method issued a warning that it's deprecated. It recommended using "cascadeBy" instead. Other than the method name, I was unable to find a difference in the method signature (same arguments, this, behaviour).
However, I was able to find this code that worked:
Thanks to this post:
http://www.sencha.com/forum/showthread.php?149627-Programmaticaly-check-uncheck-checkboxes-in-the-Tree-panel