DevExtreme v23.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.
Tree View

Hierarchical Data Structure

Use the following properties to bind the TreeView to hierarchical data:

  • items[]
    Assigns a local array as done in this demo.

  • dataSource
    Assigns a DataSource object that allows you to perform data shaping operations and use a remote source.

Each object in the TreeView's hierarchical data structure should include the following fields:

  • id
    Unique item identifier.

  • text
    Text displayed by the item.

  • items
    Nested objects (optional).

You can respectively use the keyExpr, displayExpr, and itemsExpr properties to specify custom names for the above-mentioned fields. Node objects can also include developer-defined fields and properties from this help section: items[].

In this demo, nodes use the expanded property, which specifies whether a node is collapsed or expanded. They also include the developer-defined price and image fields.

To get started with the DevExtreme TreeView component, refer to the following tutorial for step-by-step instructions: Getting Started with TreeView.

Thank you for your interest in our ASP.NET MVC product libraries and UI component suite. We are moving ASP.NET MVC-related demos and content to Please make sure to update your bookmarks with our new URL.

View Demo