Skip to main content
Version: 3.5

SelectedListViewItemCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents the collection that contains the selected items in a ListView control.

public class SelectedListViewItemCollection : IList<ListViewItem>, ICollection<ListViewItem>, IEnumerable<ListViewItem>, IEnumerable, IList, ICollection

Constructors

Instance memberSelectedListViewItemCollection(owner)

Initializes a new instance of the SelectedListViewItemCollection class.

NameTypeDescription
ownerListViewA ListView control that owns the collection.

Properties

Instance memberCount

Int32: Returns the number of items in the collection.

Instance memberIsReadOnly

Boolean: Returns whether the collection is read-only.

Instance memberItem(index)

ListViewItem: Returns the item value at the specified index within the collection.

Throws:

Instance memberItem(key)

ListViewItem: Returns the item with the specified key within the collection.

Methods

Instance memberAdd(item)

Adds the specified item in the Items collection to the SelectedItems collection.

ParameterTypeDescription
itemListViewItemThe item in the Items collection to add to the SelectedItems collection.

Returns: Int32. The new count of selected items.

Throws:

Instance memberClear()

Clears the selection.

Instance memberContains(item)

Determines whether the specified item is located in the collection.

ParameterTypeDescription
itemListViewItemThe ListViewItem to locate in the collection.

Returns: Boolean. true if the specified index from the ListViewItemCollection for the ListView is an item in the collection; otherwise, false.

Instance memberContainsKey(key)

Determines if an item with the specified key is contained in the collection.

ParameterTypeDescription
keyStringThe name of the item to search for.

Returns: Boolean. true if an item with the specified key is contained in the collection; otherwise, false.

Instance memberGetEnumerator()

Returns an enumerator that can be used to iterate through the checked index collection.

Returns: IEnumerator<ListViewItem>. An IEnumerator that represents the checked index collection.

Instance memberIndexOf(item)

Returns the index within the SelectedListViewItemCollection of the specified item.

ParameterTypeDescription
itemListViewItemThe ListViewItem to locate in the collection.

Returns: Int32. The zero-based index in the collection; otherwise, -1 if the item is not located in the collection.

Instance memberIndexOfKey(key)

Determines the index of an item with the specified key.

ParameterTypeDescription
keyStringThe name of the item to retrieve the index for.

Returns: Int32. The zero-based index for the ListViewItem with the specified name, if found; otherwise, -1.

Instance memberRemove(item)

Removes the item in the Items collection from the SelectedItems collection.

ParameterTypeDescription
itemListViewItemThe item in the Items collection to remove from the SelectedItems collection.