New to Telerik UI for ASP.NET MVC? Download free 30-day trial

ASP.NET MVC TreeView Basic Usage

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
basic_usage.cshtml
Basic_UsageController.cs

Also available for:

CLIENT-SIDE API SERVER-SIDE API

Description

The Telerik UI for ASP.NET MVC TreeView is commonly used to navigate directories and files on a file system. The directory nodes contain subdirectories and files, which are visible on expand. Also, the component can illustrate the hierarchical relationship of items to their peers and nodes.

This example demonstrates a basic configuration of the TreeView, where all nodes are represented with texts and sprites. Rather than including a separate image file for each node, you can set a single image with CSS by using the background-image property, and specify the respective sprite CSS class for each node by using the SpriteCssClasses() option. In this way, the total number of HTTP requests will be reduced.

Additional Apps

This TreeView example is part of a unique collection of hundreds of ASP.NET MVC demos, with which you can see all Telerik ASP.NET MVC components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in the ThemeBuilder.

Support & Learning Resources

Additional Resources