DataGridViewColumnCollection::Item Property (Int32)
.NET Framework (current version)
Gets or sets the column at the given index in the collection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: property DataGridViewColumn^ default[ int index ] { DataGridViewColumn^ get(int index); }
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
Available since 2.0
Show: