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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to refresh the Treeview after editing from client and server side?

Description

Refresh the TreeView with data bound using database based on changes made with TreeView editing. You can refresh the nodes from client and server side as follows.

Solution

Server side

The Treeview control is refreshed by the data rebinding process in server side. When any change is done in the Treeview control, it rebind the data from database.

The database is rendered in Treeview by the TreeViewdata() method, and Treeview node can be refreshed from the database using DataRefresh() method. TreeviewRefresh() method is used to refresh the TreeviewNodelist and bind the nodes to Treeview control. To update the database, you can use TreeView1_NodeRenamed() and data is added to the database from the Treeview control. You can use button as shown in the following code example to add a node in Treeview.

ASPX

 

ASPX.CS

Client side

The Treeview control is refreshed by the Refresh() function. EnableCallbacks property is set to true in Treeview to refresh the data. You can use the advance button to trigger Refresh() function when you click the button. Refer the following code example.

ASPX

 

Article ID: Published Date: Last Revised Date: Platform: Control:
2538 08/26/2014 12/15/2014 ASP.NET Web Forms (Classic) TreeView
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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