Skip to main content
A newer version of this page is available. .

BaseListBoxControl.SelectionMode Property

Gets or sets whether a single or multiple items can be selected.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v20.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(SelectionMode.One)]
[DXCategory("Behavior")]
public SelectionMode SelectionMode { get; set; }

Property Value

Type Default Description
SelectionMode **One**

A SelectionMode enumeration member specifying the list box control’s selection behavior.

Remarks

Use this property to determine how many items a user can select at once and the way the user can perform multiple selections. By default, the list box control functions in single selection mode so that only a single item can be selected at a time. When the SelectionMode property is set to SelectionMode.MultiExtended, pressing SHIFT and clicking the mouse or pressing SHIFT and one of the arrow keys (UP ARROW, DOWN ARROW, LEFT ARROW, and RIGHT ARROW) extends the selection from the previously selected to the current item. Pressing CTRL and clicking the mouse selects or deselects an item in the list. When the property is set to SelectionMode.MultiSimple, a mouse click or pressing the SPACEBAR selects or deselects an item in the list.

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.

See Also