Tab

ASPxTreeView.NodeTextTemplate Property

Gets or sets a common template used for displaying the text content of all nodes within an ASPxTreeView control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

[DefaultValue(null)]
public virtual ITemplate NodeTextTemplate { get; set; }

Property Value

Type Default Description
ITemplate

null

An object supporting the System.Web.UI.ITemplate interface, which contains the template used for displaying the text content of all nodes within an ASPxTreeView.

Remarks

Use the NodeTextTemplate property to define a common text content for all nodes within an ASPxTreeView control. The template created using this property replaces the text content of each node within the menu - in particular, the node’s specified text.

Note that any style settings defined for the nodes via specific properties (such as the TreeViewStyles.Node) are still in effect for the nodes whose contents are specified through using the NodeTextTemplate property.

The text content of an individual node can be defined using the node’s TreeViewNode.TextTemplate property.

NOTE

Once a template defined by this property is created, it is instantiated within a container represented by the TreeViewNodeTemplateContainer class. The TreeViewNodeTemplateContainer class implements a set of properties which can be useful when designing a template and binding the controls comprising this template, to data.

Example

This example demonstrates how you can create templates.

View Example