This question is locked. New answers and comments are not allowed.
hi,
In my tree view the user can expand a node by selecting the full item.
Now I want to enriched this behavior by collapsing the item in case it was already expanded. No problem, treeView.collapse(e.item) will do just that.
My problem is how to determine the current state of the node. All I can google is this 'expanded' flag, no hints how to get it.
Any help appreciated
Peter
In my tree view the user can expand a node by selecting the full item.
var tv = Html.Telerik().TreeView()
.Name("Activiteit")
.Items(item =>
{
// Usual stuff here
})
.ClientEvents(e => e.OnSelect("ActiviteitGekozen"));
The js-function:function ActiviteitGekozen(e) {
var treeView = $("#Activiteit").data("tTreeView");
treeView.expand(e.item);
}
Works like a charm.Now I want to enriched this behavior by collapsing the item in case it was already expanded. No problem, treeView.collapse(e.item) will do just that.
My problem is how to determine the current state of the node. All I can google is this 'expanded' flag, no hints how to get it.
Any help appreciated
Peter
