找出Ext.panel.tree中ExtJs中的一个选定项是否有一个小孩 [英] Find out if a selected item in ExtJs ina Ext.panel.tree has a child
本文介绍了找出Ext.panel.tree中ExtJs中的一个选定项是否有一个小孩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有人知道如何在ExtJS中,如果 Ext.tree.Panel
中的选定项目有一个小孩?我知道你可以通过执行 tree_dir.getSelectionModel()。getSelection()
找到一个选定的项目,但我没有看到任何方法来检查它是否有任何孩子。 p>
does anyone know a way to find out, in ExtJS if a selected item in an Ext.tree.Panel
has a child? I know you can find a selected item by doing tree_dir.getSelectionModel().getSelection()
but I don't see any way to check if it has any children.
推荐答案
tree_dir.getSelectionModel()。getSelection()
应该返回的实例有 hasChildNodes()
方法专门为此目的。
The instance returned by tree_dir.getSelectionModel().getSelection()
should have hasChildNodes()
method specifically for that purpose.
这篇关于找出Ext.panel.tree中ExtJs中的一个选定项是否有一个小孩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文