DataGridViewColumnCollection.Item Property (Int32)

 

Gets or sets the column at the given index in the collection.

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

public DataGridViewColumn this[
	int index
] { get; }

Parameters

index
Type: System.Int32

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

Property Value

Type: System.Windows.Forms.DataGridViewColumn

The DataGridViewColumn at the given index.

Exception Condition
ArgumentOutOfRangeException

index is less than zero or greater than the number of columns in the collection minus one.

.NET Framework
Available since 2.0
Return to top
Show: