Skip to main content
Version: 4.1

ObjectCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Represents the collection of items in a Wisej.Web.ComboBox control.

public class ObjectCollection : IList, ICollection, IEnumerable

Properties

Instance member Count

Int32: Returns the number of items in the collection.

Instance member IsReadOnly

Boolean: Returns a value indicating whether this collection can be modified.

Instance member Item(index)

Object: Retrieves the item at the specified index within the collection.

Throws:

Methods

Instance member Add(item)

Adds an item to the list of items for a ComboBox.

ParameterTypeDescription
itemObjectAn object representing the item to add to the collection.

Returns: Int32. The zero-based index of the item in the collection.

Throws:

Instance member AddRange(items)

Adds a collection of items to the list.

ParameterTypeDescription
itemsObject[]Collection of items to add to the list.

Instance member Clear()

Removes all items from the ComboBox.

Instance member Contains(value)

Determines if the specified item is located within the collection.

ParameterTypeDescription
valueObjectAn object representing the item to locate in the collection.

Returns: Boolean. true if the item is located within the collection; otherwise, false.

Throws:

Instance member CopyTo(destination, index)

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

ParameterTypeDescription
destinationObject[]The object array to copy the collection to.
indexInt32The location in the destination array to copy the collection to.

Instance member GetEnumerator()

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

Returns: IEnumerator. A IEnumerator that represents the item collection.

Protected member GetRealIndex(index)

Returns the real index in the collection accounting for the deleted items that have not been committed to the client yet.

ParameterTypeDescription
indexInt32

Returns: Int32.

Instance member IndexOf(value)

Retrieves the index within the collection of the specified item.

ParameterTypeDescription
valueObjectAn object representing the item to locate in the collection.

Returns: Int32. The zero-based index where the item is located within the collection; otherwise, -1.

Throws:

Instance member Insert(index, item)

Inserts an item into the collection at the specified index.

ParameterTypeDescription
indexInt32The zero-based index location where the item is inserted.
itemObjectAn object representing the item to insert.

Throws:

Protected member OnCollectionChanged(action, element)

Fires the CollectionChanged event.

ParameterTypeDescription
actionCollectionChangeActionOne of CollectionChangeAction indicating the reason the collection has changed.
elementObjectThe element that was added or removed from the collection, or null.

Instance member Remove(value)

Removes the specified item from the ComboBox.

ParameterTypeDescription
valueObjectThe Object to remove from the list.

Instance member RemoveAt(index)

Removes an item from the ComboBox at the specified index.

ParameterTypeDescription
indexInt32The index of the item to remove.

Throws:

  • ArgumentOutOfRangeException The index parameter was less than zero, or the index parameter was greater than or equal to the count of items in the collection.

Events

Instance member CollectionChanged

CollectionChangeEventHandler Fired when the collection changes.