We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Is there a way to force a refresh on a tree node?

I've got an ejTreeView. It's set to loadOnDemand. Outside of the tree view I have a sync button that syncs with a third party software tool for the selected node. When it is done syncing to y database I would like the selected node to refresh. It works fine if the node has not be expanded but once the selected node is expanded I don't know how to get it to update.

7 Replies

BR Brian March 8, 2019 10:38 PM UTC

The subject was supposed to say REFRESH not fresh

CI Christopher Issac Sunder K Syncfusion Team March 11, 2019 08:42 AM UTC

Hi Brian, 

Thank you for contacting Syncfusion support. 

We checked your query – “To refresh TreeView nodes”. The TreeView component provides option to refresh the tree nodes using refresh method. You can call this method to achieve your requirement. Please check below code snippet, 

var treeObj = $("#treeview").ejTreeView('instance'); 
//Invoking TreeView refresh method 

We have prepared a sample for your reference. Please find it below, 


Please let us know if you require any further assistance. 


BR Brian March 11, 2019 03:42 PM UTC

I only want to refresh one node (the selected node). Since the tree is set to load on demand (loadOnDemand = true) it refreshes the root level but that is it.

CI Christopher Issac Sunder K Syncfusion Team March 12, 2019 12:37 PM UTC

Hi Brian, 

TreeView refresh method refreshes the entire TreeView, and it cannot be invoked for particular nodes. However, we suspect your requirement is to add nodes or update node text for an existing node. For this, you can use addNodes method which adds new nodes or updateText method which updates the node’s text. On using this method, the TreeView gets automatically refreshed for that particular node and there will be no need to call the refresh method. 

Also, you have mentioned that only the root level is refreshed on calling refresh method, are you referring to the root level node or the parent of the particular node? 

If this does not resolve your issue, get back to us with the details so that we can help you further. 


BR Brian March 12, 2019 03:22 PM UTC

As I mentioned before I am using loadOnDemand = true. That loads nodes one at a time rather than the entire tree structure. I would like to be able to just fresh a single node. Calling addNode or removeNode is not what I want. I can work around it with a kludge but I was just hoping there was a right way to do it.

CI Christopher Issac Sunder K Syncfusion Team March 13, 2019 12:39 PM UTC

Hi Brian, 

We have validated your requirement – “To refresh single/particular nodes” and logged it as a feature request in TreeView. We will implement and include this feature in any of our upcoming releases. You can track this feature through the following feedback portal link, 

At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. You can also communicate with us regarding the open features any time using our Feature Report page .   


BR Brian March 13, 2019 05:44 PM UTC


Live Chat Icon For mobile
Up arrow icon