ASPxGridLookup.SelectionMode Property
Gets or sets a value that specifies item selection behavior.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v25.2.dll
NuGet Package: DevExpress.Web
Declaration
[DefaultValue(GridLookupSelectionMode.Single)]
public GridLookupSelectionMode SelectionMode { get; set; }
Property Value
| Type | Default | Description |
|---|---|---|
| GridLookupSelectionMode | Single | One of the GridLookupSelectionMode enumeration values. |
Available values:
| Name | Description |
|---|---|
| Single | Only one list item can be selected at one time. |
| Multiple | Multiple items can be selected within the editor’s dropdown list. |
Remarks
The SelectionMode property specifies how many list items (grid rows) can be selected simulateneously within the dropdown ASPxGridView control.
<dx:ASPxGridLookup ID="gridLookup" runat="server" SelectionMode="Multiple" ...>
<Columns>
<dx:GridViewCommandColumn ShowSelectCheckbox="True" SelectAllCheckboxMode="AllPages" />
<!-- ... -->
</Columns>
<!-- ... -->
</dx:ASPxGridLookup>
For more information about available selection modes, read the Selection Modes topic.
Note
- When the multiple selection mode is enabled (the
SelectionModeproperty is set toMultiple), incremental filtering does not work. - In single-selection mode, the GridLookup always synchronizes its value with the focused row in the drop-down grid when a user sorts grid columns, navigates through pages,etc. You can press ESC to rollback a newly selected value and restore an original editor’s value.
Note
The SelectionMode property synchronizes its value with the ASPxGridViewBehaviorSettings.AllowSelectSingleRowOnly property (which can be accessed through the GridViewProperties.SettingsBehavior property).
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectionMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.