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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

143212 Mar 8,2019 10:11 PM UTC Mar 13,2019 05:44 PM UTC JavaScript 7
loading
Tags: ejTreeView
Brian
Asked On March 8, 2019 10:11 PM UTC

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.

Brian
Replied On March 8, 2019 10:38 PM UTC

The subject was supposed to say REFRESH not fresh

Christopher Issac Sunder K [Syncfusion]
Replied On 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 
treeObj.refresh(); 

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

Sample: 

Please let us know if you require any further assistance. 

Thanks, 
Christo

Brian
Replied On 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.

Christopher Issac Sunder K [Syncfusion]
Replied On 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. 

Thanks, 
Christo 


Brian
Replied On 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.

Christopher Issac Sunder K [Syncfusion]
Replied On 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 .   

Thanks,
Christo


Brian
Replied On March 13, 2019 05:44 PM UTC

Thanks!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;