Skip to main content

TreeViewSettings.TextField Property

Gets or sets the data source field that provides caption texts for nodes.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v23.2.dll

NuGet Package: DevExpress.Web.Mvc5


public string TextField { get; set; }

Property Value

Type Description

A string value that specifies the name of the required data source field.


The TextField property is in effect if the TreeView is bound to a data source.

Use the TextField property to specify the bound data source’s data field (or an xml element’s attribute) which stores node texts. The TextField property maps the TreeViewNode.Text properties of MVCxTreeViewNode objects to the specified data field’s values.

You can format the obtained texts by using the TreeViewSettings.TextFormatString property.

If the TextField property of a data bound TreeView is not defined, the control can automatically obtain node texts from a data field whose name is “Text” (which is equal to the TreeViewNode.Text property’s name).

See Also