Feb 03, 2015, 9:01 PM
TreePanel data disappear when enable locking on columns
Hi,
I have a problem that the data won't show if any columns are locked or if locking is enabled on the TreePanel.
The problem can be seen by uncommenting //.Locked(true) on the first column in the following code:
I have a problem that the data won't show if any columns are locked or if locking is enabled on the TreePanel.
The problem can be seen by uncommenting //.Locked(true) on the first column in the following code:
@{
var x = Html.X();
}
@x.ResourceManager()
@(
x.TreePanel()
.Root(x.Node().CustomAttributes(new { Title="Root" }))
.RootVisible(true)
.Width(500).Height(200)
.ColumnModel(
x.TreeColumn()
.DataIndex("Title")
.Width(180)
.Text("Title")
//.Locked(true)
,
x.Column().DataIndex("C1").Text("C1")
,
x.Column().DataIndex("C2").Text("C2")
)
.Plugins(x.CellEditing())
.MultiSelect(true)
.Store(x.TreeStore()
.Proxy(x.LocalStorageProxy())
.Model(x.Model()
.Fields(c =>
{
c.Add(x.ModelField().Name("Title"));
c.Add(x.ModelField().Name("C1"));
c.Add(x.ModelField().Name("C2"));
})
)
.AutoLoad(false)
)
.Listeners(l =>
{
l.BeforeLoad.Handler = "return false;";
l.AfterRender.Handler = @"
var me = this, root = me.getRootNode();
root.appendChild({Title:'New node 1', C1:'Data 11', C2:'Data 12'});
root.appendChild({Title:'New node 2', C1:'Data 21', C2:'Data 22'});
root.expand();
";
})
)