ListView::SelectedIndexCollection::Remove Method (Int32)
.NET Framework (current version)
Removes the item at the specified index in the Items collection from the ListView::SelectedIndexCollection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- itemIndex
-
Type:
System::Int32
The index of the item in the Items collection to remove from the ListView::SelectedIndexCollection.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The specified index is less than 0 or greater than or equal to the number of items in the owner ListView. -or- The owner ListView is in virtual mode, and the specified index is less than 0 or greater than or equal to the value of VirtualListSize. |
If the ListView is in virtual mode and the handle for the owner ListView has not been created (you can check this using the Control::IsHandleCreated property), calling the Remove method will have no effect on the ListView::SelectedIndexCollection.
.NET Framework
Available since 2.0
Available since 2.0
Show: