Item Property
Collapse the table of content
Expand the table of content

DataGridViewComboBoxCell.ObjectCollection.Item Property (Int32)

 

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

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual object this[
	int index
] { get; set; }

Parameters

index
Type: System.Int32

The zero-based index of the element to get or set.

Property Value

Type: System.Object

The Object stored at the given index.

Exception Condition
ArgumentOutOfRangeException

index is less than 0 or greater than the number of items in the collection minus one.

ArgumentNullException

The specified value when setting this property is null.

ArgumentException

When setting this property, the cell's DataSource property value is not null.

InvalidOperationException

When setting this property, the cell is in a shared row.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft