[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Collapse]Site Navigation and Layout
   [Expand]Product Information
   [Expand]Floating Action Button
   [Expand]Form Layout
   [Expand]Navigation Bar
   [Expand]Page Control and Tab Control
    Panel Overview
   [Expand]Site Map Control
   [Expand]Tag Cloud Control
   [Expand]Title Index
     ASPxTreeView Overview
     [Expand]Binding to Data
      Expanding and Collapsing Nodes
      Animation Effect
      Check Box Support
    [Expand]Visual Elements
    [Expand]Member Tables
    [Expand]ASPxTreeView - Animated Images
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


The ASPxTreeView control supports template technology, allowing you to completely customize the control's appearance and layout. The look of the ASPxTreeView control's default elements can be completely modified by creating a specific template, defining how an element will be rendered by a client browser.

The ASPxTreeView control allows you to create templates for two element types: the node text content and the entire node content. You can apply templates for all identical elements within the ASPxTreeView (using control level templates) or for a particular element (using node level templates).

The table below lists the members, used to create templates:

Entire node content templates Node text content templates
Control level templates ASPxTreeView.NodeTemplate ASPxTreeView.NodeTextTemplate
Node level templates TreeViewNode.Template TreeViewNode.TextTemplate

Note that templates created at the node level override control level templates.


You can respond to manipulations with elements contained within a template, by writing a ASPxTreeView.NodeCommand event handler, to perform specific actions each time the event is raised by any control contained within any template.


Expanded Template Creation

At design time, you can create a template, using Template Designer, or directly in the .aspx file. The image below shows how the Template Designer can be invoked.

Expanded Example: Creating Templates in ASPX Markup

This example demonstrates how different templates can be defined in aspx code. The result is shown by the first image in this topic (see it above).

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E2511.

This example demonstrates how you can create templates.

Expanded Member Table

Is this topic helpful?​​​​​​​