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

ASPxGridLookup.Value Property

Gets or sets the value of the selected item key field.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll


public override object Value { get; set; }
Public Overrides Property Value As Object

Property Value

Type Description

A Object value.


The Value property contains the value of the field specified via the ASPxGridLookup.KeyFieldName property for the selected item. You can use this property to manipulate an item selected within the ASPxGridLookup control.

If you need to validate the editor's value before posting it, you can use either the client-side ASPxClientEdit.Validate or server-side ASPxEdit.Validate method, or both. If no validation is performed and the value posted is not correct, then an exception is raised.

refer to the Selection Modes topic, to learn more.


When multiple selection is used (the ASPxGridLookup.SelectionMode property is set to Multiple), the Value property contains the value of the first selected item. In this case, to get and set the selected item values, use the ASPxGridBase.GetSelectedFieldValues and ASPxGridView.Selection members respectively. These members can be accessed via the ASPxGridLookup.GridView property. To learn more, see the Code Central example: How to use ASPxGridLookup in multiple selection mode as the ASPxGridView editor

See Also