Skip to main content
Version: 3.5

ListViewSubItemCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents the collection of subitems in a ListViewSubItem item.

public class ListViewSubItemCollection : IList, ICollection, IEnumerable, IList<ListViewSubItem>, ICollection<ListViewSubItem>, IEnumerable<ListViewSubItem>

Properties

Instance memberCount

Int32: Returns the total number of subitems in the collection.

Instance memberIsReadOnly

Boolean: Returns a value indicating whether the collection is read-only.

Instance memberItem(index)

ListViewSubItem: Returns or sets the subitem at the specified index in the collection.

Throws:

Instance memberItem(key)

ListViewSubItem: Returns the subitem with the specified key from the collection.

Methods

Instance memberAdd(text)

Adds a new subitem with the specified label text to the end of the current collection.

ParameterTypeDescription
textStringThe label text displayed by the ListViewSubItem.

Returns: ListViewSubItem. A ListViewSubItem that represents the item being added to the collection.

Instance memberAdd(text, foreColor, backColor, font)

Adds a new subitem to the collection with the specified text, foreground color, background color, and font settings.

ParameterTypeDescription
textStringThe text to display for the subitem.
foreColorColorA Color that represents the foreground color of the subitem.
backColorColorA Color that represents the background color of the subitem.
fontFontA Font that represents the typeface to display the subitem's text in.

Returns: ListViewSubItem. The ListViewSubItem that was added to the collection.

Instance memberAdd(item)

Adds a previously created subitem to the end of the collection.

ParameterTypeDescription
itemListViewSubItemThe ListViewSubItem to add to the collection.

Returns: ListViewSubItem. A ListViewSubItem that represents the item being added to the collection.

Throws:

Instance memberAddRange(items)

Creates new subitems based on an array of strings and adds them to the collection.

ParameterTypeDescription
itemsString[]An array of strings representing the text of each subitem to add to the collection.

Instance memberAddRange(items, foreColor, backColor, font)

Creates new subitems based on an array of strings and adds them to the collection with the specified foreground color, background color, and font.

ParameterTypeDescription
itemsString[]An array of strings representing the text of each subitem to add to the collection.
foreColorColorA Color that represents the foreground color of the subitem.
backColorColorA Color that represents the background color of the subitem.
fontFontA Font that represents the typeface to display the subitem's text in.

Instance memberAddRange(items)

Adds an array of previously created subitems to the collection.

ParameterTypeDescription
itemsListViewSubItem[]An array of ListViewSubItem to add to the collection.

Throws:

Instance memberClear()

Removes all ListViewSubItem instances from the collection.

Instance memberClear(dispose)

Removes all ListViewSubItem instances from the collection and optionally disposes them.

ParameterTypeDescription
disposeBooleanIndicates whether the removed items should be disposed.

Instance memberContains(item)

Determines whether the specified subitem is a member of the collection.

ParameterTypeDescription
itemListViewSubItemThe ListViewSubItem to locate in the collection.

Returns: Boolean. true if the ListViewSubItem is a member of the collection; otherwise, false.

Instance memberContainsKey(key)

Determines whether the collection contains a subitem with the specified key.

ParameterTypeDescription
keyStringThe name of the ListViewSubItem to search for.

Returns: Boolean. true to indicate the collection contains a ListViewSubItem with the specified key; otherwise, false.

Instance memberCopyTo(dest, index)

Copies the entire collection into an existing array at a specified location within the array.

ParameterTypeDescription
destArrayThe destination array.
indexInt32The index in the destination array at which storing begins.

Instance memberGetEnumerator()

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

Returns: IEnumerator<ListViewSubItem>. An IEnumerator that represents the ListViewSubItemCollection.

Instance memberIndexOf(subitem)

Returns the index of the specified subitem in the collection.

ParameterTypeDescription
subitemListViewSubItemThe ListViewSubItem to locate in the collection.

Returns: Int32. The zero-based index of the item found in the ListViewSubItemCollection; otherwise, -1.

Instance memberIndexOfKey(key)

Returns the index of the first occurrence of a subitem with the specified key.

ParameterTypeDescription
keyStringThe name of the ListViewSubItem to search for.

Returns: Int32. The zero-based index of the first occurrence of a ListViewSubItem with the specified key, if found; otherwise, -1.

Instance memberInsert(index, item)

Inserts an existing ListViewSubItem into the collection at the specified location.

ParameterTypeDescription
indexInt32The indexed location within the collection to insert the subitem.
itemListViewSubItemThe ListViewSubItem to insert into the collection.

Returns: ListViewSubItem. The ListViewSubItem that was inserted in the collection.

Throws:

Instance memberInsert(index, text)

Creates a new subitem with the specified text and inserts it at the specified index.

ParameterTypeDescription
indexInt32The location within the collection to insert the ListViewSubItem.
textStringThe text to display in the ListViewSubItem.

Returns: ListViewSubItem. The ListViewSubItem that was inserted in the collection.

Instance memberInsert(index, key, text)

Creates a new subitem with the specified text and key, and inserts it into the collection.

ParameterTypeDescription
indexInt32The location within the collection to insert the ListViewSubItem.
keyStringThe name of the ListViewSubItem.
textStringThe text to display in theListViewSubItem.

Returns: ListViewSubItem. The ListViewSubItem that was inserted in the collection.

Instance memberRemove(item)

Removes the specified subitem from the collection.

ParameterTypeDescription
itemListViewSubItemThe ListViewSubItem to remove.

Instance memberRemoveAt(index)

Removes a subitem from the collection at a specified index.

ParameterTypeDescription
indexInt32The index of the ListViewSubItem to remove.

Instance memberRemoveByKey(key)

Removes the subitem with the specified key from the collection.

ParameterTypeDescription
keyStringThe name of the ListViewSubItem to remove from the collection.

Events

Instance memberCollectionChanged

CollectionChangeEventHandler Fired when the collection changes.