Skip to main content

BaseListBoxControl.SelectedIndices Property

Gets a collection containing the indexes of all currently selected items in the list box control.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[Browsable(false)]
public BaseListBoxControl.SelectedIndexCollection SelectedIndices { get; }

Property Value

Type Description
DevExpress.XtraEditors.BaseListBoxControl.SelectedIndexCollection

A SelectedIndexCollection object representing the collection of all currently selected items in the control.

Remarks

If the BaseListBoxControl.SelectionMode property value is set to SelectionMode.MultiSimple or Selection.MultiExtended, the SelectedIndices property returns a collection containing the indexes of all items that are selected in the list box control. For a single selection, when the BaseListBoxControl.SelectionMode property is set to SelectionMode.One, this property returns a single element collection containing the index of the selected item. In this case, you can also use the BaseListBoxControl.SelectedIndex property.

If you need to obtain the currently selected item, use the BaseListBoxControl.SelectedItem property.

See Also