Treepanel在没有孩子Extjs的节点上展开/折叠 [英] Treepanel expand/collapse on a node without children Extjs

查看:424
本文介绍了Treepanel在没有孩子Extjs的节点上展开/折叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ExtJs 4.2。在我的树面板中使用属性 useArrows:true 如何在树状面板中显示没有孩子的节点上的折叠/展开图标。展开并折叠时,应该触发与树状面板相关的所有事件。



I尝试添加



1 - children:[{}] 给了我未定义的属性。



2 - loaded:true nothing nothing



3 - singleExpand:true 没有发生任何事情



4 - allowChildren:true p>

解决方案

一个黑客是将子项目实际添加到节点,但用css隐藏。
所以你可以这样做:

  #tree_element_id .x-grid-tree-node-leaf {
显示:无;
}


I am using ExtJs 4.2. Am using property useArrows:true in my tree panel. How to show the collapse/expand icon on a node without children in a tree panel.On expand and collapse it should fire all the events related to the tree panel.

I tried adding

1-children:[{}] gave me undefined property.

2-loaded:true nothing happened

3-singleExpand:true nothing happened

4-allowChildren:true nothing happened

解决方案

One hack is to actually add children items to the node but hide them with css. So you would do something like:

#tree_element_id .x-grid-tree-node-leaf{
  display:none;
}

这篇关于Treepanel在没有孩子Extjs的节点上展开/折叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆