System.Windows.Forms.DataGridViewCellStyle.ApplyStyle Method

Applies the specified System.Windows.Forms.DataGridViewCellStyle to the current System.Windows.Forms.DataGridViewCellStyle.

Syntax

public virtual void ApplyStyle (DataGridViewCellStyle dataGridViewCellStyle)

Parameters

dataGridViewCellStyle
The System.Windows.Forms.DataGridViewCellStyle to apply to the current System.Windows.Forms.DataGridViewCellStyle.

Remarks

The DataGridViewCellStyle.ApplyStyle(DataGridViewCellStyle) method applies the values of the properties that are set in the dataGridViewCellStyle parameter to the current System.Windows.Forms.DataGridViewCellStyle. If a property is not set in dataGridViewCellStyle, the current System.Windows.Forms.DataGridViewCellStyle retains its value of that property.

Requirements

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