This is a migrated thread and some comments may be shown as answers.

Removing Tree Nodes

1 Answer 124 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
StevenDom
Top achievements
Rank 1
StevenDom asked on 07 Nov 2014, 09:53 PM
I have a TreeView with 4 levels of nodes. Here is my scenario

1) Expand the tree tree along one path all the way down to the leaf nodes.
2) Now I need to go back to the second level node and remove all child branches so that the next time I expand this node the data is reread from the database.

Currently if I just collapse the second level node the data will remain on the client and not be refreshed from the database.

How can I do this? There seems to be multiple ways to prune / destroy / remove / detach a branch of nodes and I am unsure which will force a reread from the database.

Or is there a way to instruct the treeview to always reread from the database when a node is expanded?

Thanks

Stevebn

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 10 Nov 2014, 01:26 PM
Hello Steven,

In order to force a reload of nodes, set the loaded flag of the dataItem to false. See the example of the Node loaded method.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
StevenDom
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or