Data Binding Using Mapping Properties

When the ASPxTreeView control binds to an arbitrary data source (specified by the ASPxHierarchicalDataWebControl.DataSourceID or ASPxDataWebControlBase.DataSource), a TreeViewNode object is created automatically for every recognized data item. The individual node's characteristics (such as text, name, image path, navigation location, and tooltip text) are obtained from the data fields (item attributes) of the corresponding data items. The ASPxTreeView exposes its specific data-related properties, allowing you to specify which data source fields the node information should be retrieved from. The table below lists these properties and the corresponding properties of a TreeViewNode object.

ASPxTreeView control data-related properties Corresponding TreeViewNode object properties
ASPxTreeView.ImageUrlField TreeViewNode.Image.Url
ASPxTreeView.NameField TreeViewNode.Name
ASPxTreeView.NavigateUrlField TreeViewNode.NavigateUrl
ASPxTreeView.TextField TreeViewNode.Text
ASPxTreeView.ToolTipField TreeViewNode.ToolTip

In the picture below, binding to an XML file is used as an illustration of the data retrieval path during the binding process.

TreeView - Data-related Properties

See Also