Refresh Treeview with on demand loading

3 posts, 1 answers
  1. Amos
    Amos avatar
    6 posts
    Member since:
    Jul 2014

    Posted 20 May 2015 Link to this post

    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. Answer
    Dess
    Admin
    Dess avatar
    1601 posts

    Posted 21 May 2015 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Amos
    Amos avatar
    6 posts
    Member since:
    Jul 2014

    Posted 21 May 2015 in reply to Dess Link to this post

    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

Back to Top