sveins12
Aug 14, 2016, 1:29 PM
I am trying to hide some nodes from a NestedList, and I want to show it later. But I cannot figure out how. Also, I would like to hide the node during the configuration (C#-code), but I cannot find any Visible or Hidden property for the nodes.
@{
var x = Html.X();
}
@(
x.NestedList()
.Store(c=> c.Add(x.TreeStore()
.Root(x.Node()
.Children(
x.Node()
.Text("Node0")
,
x.Node()
.Text("Node1")
)
)
))
.Listeners(l=>l.Initialize.Handler= @"
// Putting Node0 into a record-variable:
var record = item.getStore().getRoot().childNodes[0];
// Logging the visible-property on the console shows that visible=true;
console.log('Node0 visible:', record.get('visible'));
// Setting visible to false:
record.set('visible', false);
// Logging shows that the the visible-property is now false:
console.log('Node0 visible:', record.get('visible'));
// Right now the first node in the list should be hidden, but it is still visible.
// Is there some refresh-method that should be called here?
")
)
@{
var x = Html.X();
}
@(
x.NestedList()
.Store(c=> c.Add(x.TreeStore()
.Root(x.Node()
.Children(
x.Node()
.Text("Node0")
,
x.Node()
.Text("Node1")
)
)
))
.Listeners(l=>l.Initialize.Handler= @"
// Putting Node0 into a record-variable:
var record = item.getStore().getRoot().childNodes[0];
// Logging the visible-property on the console shows that visible=true;
console.log('Node0 visible:', record.get('visible'));
// Setting visible to false:
record.set('visible', false);
// Logging shows that the the visible-property is now false:
console.log('Node0 visible:', record.get('visible'));
// Right now the first node in the list should be hidden, but it is still visible.
// Is there some refresh-method that should be called here?
")
)