Back to Devexpress

ASPxMenuBase.TextField Property

aspnet-devexpress-dot-web-dot-aspxmenubase-0e9f048b.md

latest2.5 KB
Original Source

ASPxMenuBase.TextField Property

Gets or sets the name of a data field (or an xml element’s attribute) which provides menu item texts.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("")]
public string TextField { get; set; }
vb
<DefaultValue("")>
Public Property TextField As String

Property Value

TypeDefaultDescription
StringString.Empty

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

|

Remarks

The TextField property is in effect if the ASPxMenuBase control is bound to a data source (via the ASPxDataWebControlBase.DataSourceID or ASPxDataWebControlBase.DataSource property).

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

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

If the TextField property of a data bound ASPxMenuBase control is not defined, the control can automatically obtain menu item texts from a data field whose name is “Text” (which is equal to the MenuItem.Text property’s name). You can also handle the ASPxMenuBase.ItemDataBound event to manipulate a menu item’s settings as required.

See Also

TextFormatString

ASPxMenuBase Class

ASPxMenuBase Members

DevExpress.Web Namespace