DataGridViewRow.InheritedStyle 属性

定义

获取行中生效的单元格样式。

C#
public override System.Windows.Forms.DataGridViewCellStyle InheritedStyle { get; }

属性值

DataGridViewCellStyle

一个用于指定行中的单元格的格式设置和样式信息的 DataGridViewCellStyle

例外

行位于 DataGridView 控件中,并且是共享行。

注解

此属性可用于确定将哪些单元格样式应用于行中的所有单元格,而不考虑应用于单元格的任何列样式。 行 InheritedStyle 属性从以下属性继承其值:

有关单元格样式继承的详细信息,请参阅 Windows 窗体 DataGridView 控件中的单元格样式

适用于

产品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

另请参阅