DataGridViewCellStyle::ApplyStyle Method (DataGridViewCellStyle^)
.NET Framework (current version)
Applies the specified DataGridViewCellStyle to the current DataGridViewCellStyle.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- dataGridViewCellStyle
-
Type:
System.Windows.Forms::DataGridViewCellStyle^
The DataGridViewCellStyle to apply to the current DataGridViewCellStyle.
| Exception | Condition |
|---|---|
| ArgumentNullException | dataGridViewCellStyle is null. |
The ApplyStyle method applies the values of the properties that are set in the dataGridViewCellStyle parameter to the current DataGridViewCellStyle. If a property is not set in dataGridViewCellStyle, the current DataGridViewCellStyle retains its value of that property.
.NET Framework
Available since 2.0
Available since 2.0
Show: