Back to Devexpress

MenuSettingsBase.TextField Property

aspnetmvc-devexpress-dot-web-dot-mvc-dot-menusettingsbase-29bbdf80.md

latest2.4 KB
Original Source

MenuSettingsBase.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.Mvc

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

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public string TextField { get; set; }
vb
Public Property TextField As String

Property Value

TypeDescription
String

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

|

Remarks

The TextField property is in effect if a menu 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 menu item texts. The TextField property maps the Text properties of menu item objects to the specified data field’s values. You can format the obtained texts by using the MenuSettingsBase.TextFormatString property.

If the TextField property of a data bound menu is not defined, the menu can automatically obtain menu item texts from a data field whose name is “Text”. You can also use the MenuSettingsBase.ItemDataBound property to manipulate a menu item’s settings as required.

See Also

TextFormatString

ItemDataBound

Data Binding Using Mapping Properties

Automatic Data Binding

Menu

MenuSettingsBase Class

MenuSettingsBase Members

DevExpress.Web.Mvc Namespace