Tab
A newer version of this page is available. Switch to the current version.

ASPxGridLookup.Text Property

Gets or sets the text displayed within the editor's edit box.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue("")]
public override string Text { get; set; }
<DefaultValue("")>
Public Overrides Property Text As String

Property Value

Type Default Description
String

String.Empty

The String value.

Remarks

The Text property contains the selected item text, formated using a pattern specified by the ASPxGridLookup.TextFormatString property. When multiple selection is used (the ASPxGridLookup.SelectionMode property is set to Multiple), the texts of multiple selected rows are joined in the input, using a special separator defined by the ASPxGridLookup.MultiTextSeparator property.

When end-users select/unselect items, the Text property value is updated accordingly. On the other hand, the control selection can be changed by specifying the Text property value (programmatically or by typing it within the editor's edit box).

refer to Selection Modes topic, to learn more.

Examples

The code sample below demonstrates how you can preselect some items in the ASPxGridLookup control by assigning the text of selected values to the ASPxGridLookup.Text property. Note that you should assign it according to the text format that you set in the ASPxGridLookup.TextFormatString property. The text of multiple selected rows is joined in the input using a special separator specified by the ASPxGridLookup.MultiTextSeparator property.

The image below shows the result.

ASPxGridLookup_SelectionMode

protected void gLookup_DataBound(object sender, EventArgs e) {
     gLookup.Text = "Chai, Chang, Ikura";
}
See Also
</