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

Refresh Treeview with on demand loading

2 Answers 275 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Amos
Top achievements
Rank 1
Amos asked on 20 May 2015, 09:22 AM

Hi,

Is there anyway to refresh (reload) treeview which has been loaded tree nodes using LazyMode with on-demand-loading. I tried with TreeView.Refresh() and TreeView.Nodes.Refresh(). Both not working. 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 May 2015, 11:13 AM
Hello Amos,

Thank you for writing.

Once you have loaded the Nodes collection for a certain RadTreeNode, the NodesNeeded event is not designed to be fired again for it. Hence, in order to force the NodesNeeded event to fire for a specific node again, you should clear its Nodes collection.

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Amos
Top achievements
Rank 1
answered on 22 May 2015, 02:22 AM

Hi Dess,

 Thanks for quick reply, I have already made changes to my code and it's working.  

this.radTreeView1.Nodes.First().Nodes.Clear();
this.radTreeView1.Nodes.First().Tag = null; //Flag for loading node
thisradTreeView1.Nodes.First().ExpandAll();

 Regards,

Soe Thu Aung

Tags
Treeview
Asked by
Amos
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Amos
Top achievements
Rank 1
Share this question
or