RadTreeView for ASP.NET

Overview and when to use templates Send comments on this topic.
See Also
Templates > Overview and when to use templates

Glossary Item Box

Telerik RadTreeView fully supports templates. You can embed any content inside a Telerik RadTreeView template:

  • HTML markup
  • ASP.NET server controls
  • other third-party controls (other Telerik RadControls for ASP.NET as well) 

When to use templates

Normally, Telerik RadTreeView allows great flexibility with regard to the functionality and appearance of your TreeNodes. However, templates are of great help if you want to embed complex elements (such as ASP .NET controls) inside your tree nodes.
For example, the only way to embed a standard ASP .NET Button control inside your TreeNodes is to add the control to the node template. Templates are also a great way to avoid setting too many properties to each tree node explicitly.

 

The example below shows how to embed images and additional text in a tree node template:

 

Templates work only when the treeview is in a bound mode.

See Also