DataGridViewComboBoxCell.ObjectCollection Class

Definition

Represents the collection of selection choices in a DataGridViewComboBoxCell.

public: ref class DataGridViewComboBoxCell::ObjectCollection : System::Collections::IList
[System.ComponentModel.ListBindable(false)]
public class DataGridViewComboBoxCell.ObjectCollection : System.Collections.IList
[<System.ComponentModel.ListBindable(false)>]
type DataGridViewComboBoxCell.ObjectCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class DataGridViewComboBoxCell.ObjectCollection
Implements IList
Inheritance
DataGridViewComboBoxCell.ObjectCollection
Attributes
Implements

Remarks

You can retrieve DataGridViewComboBoxCell.ObjectCollection objects from the DataGridViewComboBoxCell.Items property or the DataGridViewComboBoxColumn.Items property.

Constructors

DataGridViewComboBoxCell.ObjectCollection(DataGridViewComboBoxCell)

Initializes a new instance of the DataGridViewComboBoxCell.ObjectCollection class.

Properties

Count

Gets the number of items in the collection.

IsReadOnly

Gets a value indicating whether the collection is read-only.

Item[Int32]

Gets or sets the item at the current index location. In C#, this property is the indexer for the DataGridViewComboBoxCell.ObjectCollection class.

Methods

Add(Object)

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

AddRange(DataGridViewComboBoxCell+ObjectCollection)

Adds the items of an existing DataGridViewComboBoxCell.ObjectCollection to the list of items in a DataGridViewComboBoxCell.

AddRange(Object[])

Adds one or more items to the list of items for a DataGridViewComboBoxCell.

Clear()

Clears all items from the collection.

Contains(Object)

Determines whether the specified item is contained in the collection.

CopyTo(Object[], Int32)

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

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Returns an enumerator that can iterate through a DataGridViewComboBoxCell.ObjectCollection.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
IndexOf(Object)

Returns the index of the specified item in the collection.

Insert(Int32, Object)

Inserts an item into the collection at the specified index.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(Object)

Removes the specified object from the collection.

RemoveAt(Int32)

Removes the object at the specified index.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

Copies the elements of the collection to the specified array, starting at the specified index.

ICollection.IsSynchronized

Gets a value indicating whether access to the collection is synchronized (thread safe).

ICollection.SyncRoot

Gets an object that can be used to synchronize access to the collection.

IList.Add(Object)

Adds an object to the collection.

IList.IsFixedSize

Gets a value indicating whether the collection has a fixed size.

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See also