This ASP.NET MVC TreeView example demonstrates the binding data to the TreeView from remote data source. On expanding the parent node, the spinner icon will be displayed until the child nodes will be loaded into parent node. Click on node to select it, and click on icon or double click on node to expand/collapse it.
TreeView component loads the data through the
dataSource property, where the data can be either local data or remote data. In case of remote data, the data can be loaded from any remote services though the
The DataManager will act as an interface between the service endpoint and the TreeView, that requires the below minimal information to interact with the service endpoint.
DataManager->url- Defines the service endpoint to fetch data.
DataManager->adaptor- Defines the adaptor option. By default, ODataV4Adaptor is used for remote binding.
In this demo, the TreeView is bound with the dataSource from the Northwind remote service by using the DataManager instance.
For more information, you can refer to the Data Binding section from the documentation.