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
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The ASP.NET MVC TreeView is a graphical user interface control that to represents hierarchical data in a tree structure. It provides great performance with its advanced features like load on demand, checkbox support, multiple selection, tree navigation, drag and drop, tree node editing, and template support.


Why choose Syncfusion Essential Studio® ASP.NET MVC TreeView?

ASP.NET MVC TreeView high performance

High performance

Load on demand (lazy load) is enabled by default to reduce bandwidth usage when consuming large amounts of data. Only first-level nodes are loaded initially, and then child nodes are loaded when their parent node is expanded.

ASP.NET MVC TreeView seamless data binding

Seamless data binding

Bind data to the TreeView component from any valid data source in JSON format. The tree data can be local or remote and retrieved via various adapters, such as OData, OData V4, URL, JSON, and web API.

ASP.NET MVC TreeView responsiveness

Adapts to any resolution

TreeView has a highly responsive layout and an optimized design for desktops, touchscreens, and phones. It works well on all mobile phones that use iOS, Android, or Windows OS.

ASP.NET MVC TreeView admirable feature set

Admirable feature set

The ASP.NET MVC TreeView supports load on demand, bound and unbound modes, drag and drop, multiselection, and editing.

ASP.NET MVC TreeView template designs

Create your own template designs

It can be customized via node template support, which allows you to design a custom structure for tree nodes. Node templates can be used for parent nodes, child nodes, or both, and can include images and any custom element structure.

ASP.NET MVC TreeView hierarchical data

Visualize hierarchical data

The ASP.NET MVC TreeView is a graphic user interface element that displays hierarchical data as a tree structure. It can be populated with nested arrays of JSON objects from a hierarchical data source.

ASP.NET MVC TreeView customizable themes

Attractive, customizable themes

Cutting-edge design with several built-in themes, such as Fluent, Tailwind CSS, Bootstrap, Material, and Fabric. Utilize the online Theme Studio tool to customize themes of treeview easily.

ASP.NET MVC TreeView globalization and localization

Globalization and localization

Enable users from different locales to use the component by formatting dates, currency, and numbering to suit preferences.


ASP.NET MVC TreeView Code Example

Easily get started with the ASP.NET MVC TreeView using a few simple lines of C# code as demonstrated below. Also explore our ASP.NET MVC TreeView Example that shows you how to render and configure the TreeView in ASP.NET MVC.

@using Syncfusion.EJ2.Navigations

@Html.EJS().TreeView("listdata").Fields(field=>
    field.Id("id").ParentID("pid").Selected("selected").
    Expanded("expanded").Text("name").HasChildren("hasChild")
    .DataSource(ViewBag.dataSource)).Render()
public partial class TreeViewController : Controller
    { 
   
        TreeViewFieldsSettings fields = new TreeViewFieldsSettings();
      
        public ActionResult DefaultFunctionalities()
        {
List<object> listdata = new List<object>();
            listdata.Add(new
            {
                id = 1,
                name = "Australia",
                hasChild = true,
                expanded = true
            });
            listdata.Add(new
            {
                id = 2,
                pid = 1,
                name = "New South Wales",

            });
            listdata.Add(new
            {
                id = 3,
                pid = 1,
                name = "Victoria"
            });

            listdata.Add(new
            {
                id = 4,
                pid = 1,
                name = "South Australia"
            });
            listdata.Add(new
            {
                id = 6,
                pid = 1,
                name = "Western Australia",

            });
            listdata.Add(new
            {
                id = 7,
                name = "Brazil",
                hasChild = true
            });
            listdata.Add(new
            {
                id = 8,
                pid = 7,
                name = "Paraná"
            });
            listdata.Add(new
            {
                id = 9,
                pid = 7,
                name = "Ceará"
            });
            listdata.Add(new
            {
                id = 10,
                pid = 7,
                name = "Acre"
            });
            listdata.Add(new
            {
                id = 11,
                name = "China",
                hasChild = true
            });
            listdata.Add(new
            {
                id = 12,
                pid = 11,
                name = "Guangzhou"
            });
            listdata.Add(new
            {
                id = 13,
                pid = 11,
                name = "Shanghai"
            });
            listdata.Add(new
            {
                id = 14,
                pid = 11,
                name = "Beijing"
            });
            listdata.Add(new
            {
                id = 15,
                pid = 11,
                name = "Shantou"

            });
            listdata.Add(new
            {
                id = 16,
                name = "France",
                hasChild = true

            });
            listdata.Add(new
            {
                id = 17,
                pid = 16,
                name = "Pays de la Loire"

            });
            listdata.Add(new
            {
                id = 18,
                pid = 16,
                name = "Aquitaine"

            });
            listdata.Add(new
            {
                id = 19,
                pid = 16,
                name = "Brittany"

            });
            listdata.Add(new
            {
                id = 20,
                pid = 16,
                name = "Lorraine"
            });
            listdata.Add(new
            {
                id = 21,
                name = "India",
                hasChild = true

            });
            listdata.Add(new
            {
                id = 22,
                pid = 21,
                name = "Assam"

            });
            listdata.Add(new
            {
                id = 23,
                pid = 21,
                name = "Bihar"
            });
            listdata.Add(new
            {
                id = 24,
                pid = 21,
                name = "Tamil Nadu"

            });
           ViewBag.dataSource = listdata;
            return View();
    }
}

ASP.NET MVC TreeView Tree node with icons

Tree node with icons

Display nodes with labels and icons to present the content in a more readable format. This is helpful in making a typical directory tree and file system.


Checkbox

The ASP.NET MVC TreeView control provides built-in support for checkboxes, allowing users to select more than one item.

The TreeView checkbox has a tri-state mode also, which is applicable only for parent nodes. In this mode, the parent node will go into the indeterminate state when the child nodes are partially checked.

ASP.NET MVC TreeView Checkbox


Drag and drop

In ASP.NET MVC TreeView, nodes can be reordered by simply dragging and dropping them.

ASP.NET MVC TreeView control drag and drop inside a tree

Inside the tree

Tree nodes can be dragged and dropped from one parent node to another within the same level or at different levels.

ASP.NET MVC TreeView control drag and drop between trees

Outside the tree

Extending the drop behavior allows users to drop tree nodes from one TreeView to another.

ASP.NET MVC TreeView control dragging and dropping to external container

External container

Drop tree nodes to any external container or component by extending the TreeView node drop action.


Multiple node selection

The ASP.NET MVC TreeView control allows users to select multiple nodes. When the drag-and-drop feature is enabled, all the selected nodes can be dragged at the same time.

ASP.NET MVC TreeView multiple node selection

ASP.NET MVC TreeView multiple node drag and drop


ASP.NET MVC TreeView Editable nodes

Editable nodes

Edit the tree nodes’ label text on the client side by double-clicking it. When editing TreeView nodes, the TreeView data source will also be updated with the modified data.


Sorting tree nodes

Render the ASP.NET MVC TreeView nodes in the ascending or descending order based on the label text for improved readability.

ASP.NET MVC TreeView Sorting tree nodes


ASP.NET MVC TreeView Node template

Node template

The ASP.NET MVC TreeView control can be customized through its node template support, which allows defining a custom structure for tree nodes. You can use node templates specifically for parent nodes, child nodes, or both, and include images and any custom element structure.


Expand collapse icons

Easily customize the expand and collapse icons in ASP.NET MVC TreeView based on the requirement of your application.

ASP.NET MVC TreeView Expand collapse icons


ASP.NET MVC TreeView context menu

Context menu

Integrate a context menu into ASP.NET MVC TreeView to perform node manipulations such as adding, removing, and renaming nodes.


Text wrap

A node’s text wraps when it reaches edge of the TreeView. The node’s height will adjust automatically based on the content.

ASP.NET MVC TreeView text wrap


ASP.NET MVC node customization by level

Customization by node level

Customize the tree nodes based on their level, such as leaf nodes, sibling nodes, first-level nodes, and second level nodes.


Node validation

Add validation to the labels of tree nodes on editing, like a minimum or maximum length.

Tree node validation


ASP.NET MVC TreeView tooltip

Tooltips for tree nodes

It supports tooltips for tree nodes that display information about the nodes while hovering over them. You can bind a tooltip from a data source along with node fields.


Accessibility

The ASP.NET MVC TreeView component is easily accessed by screen readers. Complete keyboard interaction support has also been provided.

Keyboard navigation in ASP.NET MVC TreeView

Keyboard navigation

The ASP.NET MVC TreeView component ensures that every cell is accessible using the keyboard. Major features like sort, select, and edit can be performed using keyboard commands alone; no mouse interaction is required. This helps in creating highly accessible applications using this component.

Accessibility and screen reader support in ASP.NET MVC TreeView

Screen reader

The ASP.NET MVC TreeView has complete WAI-ARIA accessibility support. The Data Grid UI includes high-contrast visual elements that help visually impaired people to have the best viewing experience. Also, valid UI descriptions are easily accessible through assistive technologies such as screen readers.

Show right-to-left language in ASP.NET MVC TreeView

Right to left (RTL)

Right-to-left rendering allows displaying the text and layout of the ASP.NET MVC TreeView from right to left. This improves the user experience and accessibility for RTL languages.





Other supported frameworks

TreeView is also available in Blazor, Angular, React, and Vue frameworks. Check out the different TreeView platforms from the links below,

Supported browsers

The ASP.NET MVC TreeView works well with all modern web browsers such as Chrome, Firefox, Microsoft Edge, Safari, and Opera.

Supported browsers in ASP.NET MVC TreeView.

85+ ASP.NET MVC UI CONTROLS

Frequently Asked Questions

The Syncfusion ASP.NET MVC Tree View provides the following features:

  • Display hierarchical data in a tree-view structure.
  • Load a wide range of nodes with optimal performance.
  • Flexible data binding with support to use local and remote data sources such as JSON, RESTful services, OData services, and WCF services.
  • Drag and drop multiple selected tree nodes anywhere.
  • Select multiple nodes using built-in check boxes.
  • Edit node text in-line with editable nodes support.
  • Easily customize nodes, expand icons, and collapse icons.
  • One of the best ASP.NET MVC Treeview in the market that offers feature-rich UI to interact with the software.
  • Simple configuration and API.
  • Supports all modern browsers.
  • Mobile-touch friendly and responsive.
  • Expansive learning resources such as demos and documentation to learn quickly and get started with ASP.NET MVC Tree View.

We do not sell the ASP.NET MVC Tree View separately. It is only available for purchase as part of the Syncfusion team license. This contains over 1,800 components and frameworks, including the ASP.NET MVC Tree View. The price of the team license starts at $395 per month for 5 developers, and includes support and updates until the subscription expires. In addition, we might offer discounts based on currently active promotions. Please contact our product specialists today to see if you qualify for any additional discounts.

You can find our ASP.NET MVC Tree View demo, which demonstrates how to render and configure the TreeView.

No, our 1,800+ components and frameworks for web, mobile, and desktop, including our ASP.NET MVC Tree View, are not sold individually. They are only available as part of a team license. However, we have competitively priced the product, so it only costs a little bit more than what some other vendors charge for their Tree View control alone. We have also found that, in our experience, our customers usually start off using one of our products and then expand to several products quickly, so we felt it was best to offer all 1,800+ components and frameworks for a subscription fee that starts at $395 per month for a team of 5 developers. Additionally, we might be able to offer discounts based on currently active promotions. Please contact our product specialists today to see if you qualify for any additional discounts.

No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.

A good place to start would be our comprehensive getting started documentation.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Transform your applications today by downloading our free evaluation version
Download Free Trial No credit card required.

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Up arrow icon