Represents a column in a System.Windows.Forms.DataGridView control.
See Also: DataGridViewColumn Members
The System.Windows.Forms.DataGridViewColumn class represents a logical column in a System.Windows.Forms.DataGridView control. You can retrieve columns through the DataGridView.Columns collection of the control.
Unlike a System.Windows.Forms.DataGridViewRow, which contains the actual collection of cells in a System.Windows.Forms.DataGridView, System.Windows.Forms.DataGridViewColumn is used mainly to adjust the appearance and behavior of the column user interface (UI), such as column width and cell style. For more information about cell styles, see Cell Styles in the Windows Forms DataGridView Control.
Types that derive from System.Windows.Forms.DataGridViewColumn typically initialize the DataGridViewColumn.CellTemplate property to a new instance of a related type derived from the System.Windows.Forms.DataGridViewCell class. Any column properties that relate to the appearance or behavior of individual cells are wrappers for the corresponding properties of the template cell. Changing one of these properties on the column automatically changes the value on the cell template and on all cells in the column. To override the specified value for individual cells, set the cell values after you set the column value.