DataGridViewColumn.InheritedStyle DataGridViewColumn.InheritedStyle DataGridViewColumn.InheritedStyle DataGridViewColumn.InheritedStyle Property

定义

获取当前应用于该列的单元格样式。Gets the cell style currently applied to the column.

public:
 virtual property System::Windows::Forms::DataGridViewCellStyle ^ InheritedStyle { System::Windows::Forms::DataGridViewCellStyle ^ get(); };
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataGridViewCellStyle InheritedStyle { get; }
member this.InheritedStyle : System.Windows.Forms.DataGridViewCellStyle
Public Overrides ReadOnly Property InheritedStyle As DataGridViewCellStyle

属性值

DataGridViewCellStyle,表示显示该列时使用的单元格样式。A DataGridViewCellStyle that represents the cell style used to display the column.

注解

此属性用于确定哪些单元格样式应用于列中的所有单元格, 而不考虑也应用于单元格的任何行样式。This property is useful to determine which cell styles are applied to all cells in a column regardless of any row styles that are also applied to the cells. InheritedStyle属性DefaultCellStyle从和DataGridView.DefaultCellStyle属性继承其值。The column InheritedStyle property inherits its values from the DefaultCellStyle and the DataGridView.DefaultCellStyle property.

有关单元样式继承的详细信息, 请参阅Windows 窗体 DataGridView 控件中的单元格样式For more information about cell style inheritance, see Cell Styles in the Windows Forms DataGridView Control.

适用于

另请参阅