Skip to main content
Tab

ASPxListBox.SelectedItems Property

Gets the collection of selected items within the list box.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public SelectedItemCollection SelectedItems { get; }

Property Value

Type Description
SelectedItemCollection

A SelectedItemCollection object that contains the selected items.

Remarks

The SelectedItems property can be used to programmatically manage the collection of the items selected within the list box. You can add, insert, remove, retrieve, and modify the items within the collection. Any updates to the collection will be automatically reflected in the editor, the next time the page is refreshed.

Note

The SelectedItems property is not in effect if the ASPxListBox.SelectionMode property is set to ListEditSelectionMode.Single.

For more information about multiple selection, read the Multi-Selection Mode topic.

If the SelectedItems property returns null, make sure that you set the ValueType property to an .NET type that matches the ValueField column type. Otherwise, the editor cannot find the corresponding item because the editor’s ValueType property does not match the item type (String by default).

See Also