Oct 11, 2012, 2:07 PM
TreePanel | Expandable = false does not prevent collapse
I have created a TreePanel and set Expandable=false on every item (root included)...
but the plus sign, and the expand/collapse actions are still there.
In this cenario i want a fixed-static tree
but the plus sign, and the expand/collapse actions are still there.
In this cenario i want a fixed-static tree
@{
var treeView = new Ext.Net.TreePanel();
treeView.Region = Region.Center;
treeView.Title = "sample";
treeView.RootVisible = 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
};
subItem1.Children.Add(subItem2);
root.Children.Add(subItem1);
treeView.Root.Add(root);
}
@(Html.X().Viewport()
.Layout(LayoutType.Border)
.Items(i => i
.Add(treeView)
)