View Full Version : [CLOSED] TreePanel Expandable

Dec 12, 2012, 8:18 PM
Hi Team Ext.Net Could you please help me with this thread?


Thank you

Dec 13, 2012, 12:54 AM
Hello, @osef!

Sorry, but it's not good to post just link to another question. For example, it can be difficult to find what did you want if the linked question will be deleted. Rules about posting new questions you can read on this thread: http://forums.ext.net/showthread.php?3440

According to your problem, look at the following sample. The main idea is to override CSS rules to hide expande/collapse tool and to prevent collapsing by listening BeforeItemCollapse event:

.x-tree-arrows .x-tree-elbow-plus, .x-tree-arrows .x-tree-elbow-minus, .x-tree-arrows .x-tree-elbow-end-plus, .x-tree-arrows .x-tree-elbow-end-minus,
.x-tree-lines .x-grid-tree-node-expanded .x-tree-elbow-end-plus, .x-tree-lines .x-tree-elbow-end-plus {
background: none;

var treeView = new Ext.Net.TreePanel();

treeView.Region = Region.Center;
treeView.Title = "sample";
treeView.Listeners.BeforeItemCollapse.Handler = "return false";
var root = new Ext.Net.Node()
Text = "Menu",
NodeID = "node0",
Expanded = true,
Expandable = false

var subItem1 = new Ext.Net.Node()
Text = "SubItem 1",
NodeID = "node1",
Expanded = true,
Expandable = false

var subItem2 = new Ext.Net.Node()
Text = "SubItem 2",
NodeID = "node2",
Leaf = true



.Items(i => i

Dec 13, 2012, 4:48 AM
Hi everybody,

I think there is a bug in the ExtJS docs.

I see in the sources that it is true by default, not false.

It is the reason why Expandable="false" is not rendered to a client and, therefore, doesn't work.

I corrected it in SVN. Now the Expandable="false" works as expected.

Dec 13, 2012, 6:16 AM
Hi Baidaly, I'm sorry for this action, I don't return to do again and your code It's working thank you for your support.

Dec 13, 2012, 6:28 AM
No problem ;)