New to Telerik UI for ASP.NET Core? Download free 30-day trial
ASP.NET Core TreeView Remote Data Binding
- EXAMPLE
- VIEW SOURCE
-
Change Theme
defaultDefault Theme
- Main
- Main Dark
- Nordic
- Ocean Blue
- Ocean Blue A11Y
- Purple
- Turquoise
Bootstrap Theme- Main
- Bootstrap 3
- Bootstrap 3 Dark
- Main Dark
- Nordic
- Turquoise
- Turquoise Dark
- Urban
- Vintage
Material Theme- Main
- Arctic
- Lime Dark
- Main Dark
- Nova
Classic Theme- Main
- Green
- Green Dark
- Lavender
- Lavender Dark
- Main Dark
- Metro
- Metro Dark
- Moonlight
- Opal
- Opal Dark
- Silver
- Silver Dark
- Uniform
Fluent Theme- Main
Also available for:
CLIENT-SIDE API SERVER-SIDE APIDescription
The Telerik UI for ASP.NET Core TreeView supports remote data binding and you can display remote-storage data in the component.
To implement the remote data-binding feature, you need to specify a remote endpoint or web service returning data in a JSON or JSONP format, and utilize the Telerik UI for ASP.NET MVC DataSource as a mediator between the TreeView and the underlying data.
To make the connection to the remote endpoint and process the data properly, the data source requires information about the web service URL.
Usually, the remote binding is a preferable approach for TreeView data binding. You can configure it easily by adding the DataSource component in the helper definition. By default, the TreeView sends to the remote endpoint the id
of the expanded node as a query string parameter. This way, you can filter the data collection in the Action method based on the received id
parameter and return the appropriate child nodes to the DataSource of the component.
This example demonstrates how to bind the TreeView to remote data by using Html or TagHelpers.