System.Windows.Forms.ListView.MultiSelect Property

Gets or sets a value indicating whether multiple items can be selected.

Syntax

[System.ComponentModel.DefaultValue(true)]
public bool MultiSelect { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the ListView.MultiSelect property is set to true, multiple items can be selected in the System.Windows.Forms.ListView control. To select multiple items, the user must hold down the CTRL key while clicking the items to select. Consecutive items can be selected by clicking the first item to select and then, while holding down the SHIFT key, clicking the last item to select. You can use the multiple selection feature to select multiple items in the System.Windows.Forms.ListView control and perform an operation on all the items selected. For example, the user could select multiple items and then right-click a selected item to display a shortcut menu that displays a set of tasks that can be performed on the selected items.

To determine which items are selected in the System.Windows.Forms.ListView control, use the ListView.SelectedItems property. The ListView.SelectedItems property allows you to access the System.Windows.Forms.ListView.SelectedListViewItemCollection that contains a list of the selected items. If you want the index positions in the System.Windows.Forms.ListView.ListViewItemCollection instead of the items, you can use the ListView.SelectedIndices property to access the System.Windows.Forms.ListView.SelectedIndexCollection.

If you do not want to allow multiple selections in the System.Windows.Forms.ListView, yet still want to offer the user a way for multiple items to be chosen, you can display check boxes by setting the ListView.CheckBoxes property to true.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0