System.Windows.Forms.DataGridView.Columns Property

Gets a collection that contains all the columns in the control.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
[System.ComponentModel.Editor("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
[System.ComponentModel.MergableProperty(false)]
public DataGridViewColumnCollection Columns { get; }

Value

Documentation for this section has not yet been entered.

Remarks

By using the System.Windows.Forms.DataGridViewColumnCollection returned by this property, you can add columns, remove columns, and obtain a count of the columns contained in the System.Windows.Forms.DataGridView control. For more information, see System.Windows.Forms.DataGridViewColumnCollection.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0