DataGridViewColumn::DefaultCellStyle Property
Gets or sets the column's default cell style.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: [BrowsableAttribute(true)] property DataGridViewCellStyle^ DefaultCellStyle { virtual DataGridViewCellStyle^ get() override; virtual void set(DataGridViewCellStyle^ value) override; }
Property Value
Type: System.Windows.Forms::DataGridViewCellStyle^A DataGridViewCellStyle that represents the default style of the cells in the column.
The DataGridView control displays its cells using the styles indicated by the cell InheritedStyle property, which inherits styles from other properties of type DataGridViewCellStyle. For cells in this column, the styles specified through the DefaultCellStyle property override the styles specified through the DataGridView::DefaultCellStyle property, but are overridden by the styles specified through the DataGridView::RowsDefaultCellStyle, DataGridView::AlternatingRowsDefaultCellStyle, DataGridViewRow::DefaultCellStyle, and DataGridViewCell::Style properties.
For more information, see Cell Styles in the Windows Forms DataGridView Control.
Available since 2.0