Skip to main content

Data Binding Using Mapping Properties

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

ASPxMenu data-related properties Corresponding MenuItem object properties
ASPxMenuBase.ImageUrlField MenuItem.Image.Url
ASPxMenuBase.NameField MenuItem.Name
ASPxMenuBase.NavigateUrlField MenuItem.NavigateUrl
ASPxMenuBase.TextField MenuItem.Text
ASPxMenuBase.ToolTipField MenuItem.ToolTip

The picture below demonstrates the data retrieval path during binding to an XML file.

ASPxMenu_BindProp