ListView.SelectedIndexCollection

Wisej.Web.ListView SelectedIndexCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

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

public class SelectedIndexCollection : IList<Int32>, ICollection<Int32>, IEnumerable<Int32>, IEnumerable

Constructors

SelectedIndexCollection(owner)

Initializes a new instance of the SelectedIndexCollection class.

Name
Type
Description

owner

A ListView control that owns the collection.

Properties

Count

Int32: Returns the number of items in the collection.

IsReadOnly

Boolean: Returns whether the collection is read-only.

Item(index)

Int32: Returns the index value at the specified index within the collection.

Throws:

Methods

Add(index)

Adds the item at the specified index in the Items collection to the SelectedIndexCollection.

Parameter
Type
Description

index

The index of the item in the Items collection to add to the SelectedIndexCollection.

Returns: Int32. The new count of selected items.

Throws:

Clear()

Clears the selection.

Contains(selectedIndex)

Determines whether the specified index is located in the collection.

Parameter
Type
Description

selectedIndex

The index of the selected item 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.

CopyTo(array, index)

Copies the list of selected indexes into the specified array starting at the specified index .

Parameter
Type
Description

array

Array that will received the list of selected indexes.

index

Starting index in array .

GetEnumerator()

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

Returns: IEnumerator<Int32>. An IEnumerator that represents the selected index collection.

IndexOf(selectedIndex)

Returns the index within the SelectedIndexCollection of the specified index from the ListViewItemCollection of the list view control.

Parameter
Type
Description

selectedIndex

The zero-based index from the ListViewItemCollection to locate in the collection.

Returns: Int32. The zero-based index in the collection where the specified index of the ListViewItemCollection is located within the SelectedIndexCollection; otherwise, -1 if the index is not located in the collection.

Remove(index)

Removes the item at the specified index in the Items collection from the SelectedIndexCollection.

Parameter
Type
Description

index

The index of the item in the Items collection to remove from the SelectedIndexCollection.

Throws:

Last updated

Was this helpful?