DataGridViewRow.InheritedStyle 属性

定义

获取行中生效的单元格样式。Gets the cell style in effect for the row.

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

属性值

一个用于指定行中的单元格的格式设置和样式信息的 DataGridViewCellStyleA DataGridViewCellStyle that specifies the formatting and style information for the cells in the row.

异常

行位于 DataGridView 控件中,并且是共享行。The row is in a DataGridView control and is a shared row.

注解

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

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

适用于

另请参阅