DataGridViewButtonColumn::DefaultCellStyle Property
.NET Framework (current version)
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^The DataGridViewCellStyle to be applied as the default style.
The default DataGridViewCellStyle returned by this property has an initial Alignment property value of MiddleCenter. This value overrides the value specified in the DefaultCellStyle property of the DataGridView control, but may be overridden by other cell style properties. For more information, see Cell Styles in the Windows Forms DataGridView Control.
Note |
|---|
When visual styles are enabled, the buttons in a button column are painted using a ButtonRenderer and cell styles specified through properties such as DefaultCellStyle have no effect. |
.NET Framework
Available since 2.0
Available since 2.0
Show:
