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
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?

Platform: ASP.NET Web Forms (Classic) |
Control: TreeView
Tags: treeview


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.


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.




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.



You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile