DataGridViewColumnHeaderCell.GetInheritedStyle 方法

定义

获取应用于单元格的样式。

public:
 override System::Windows::Forms::DataGridViewCellStyle ^ GetInheritedStyle(System::Windows::Forms::DataGridViewCellStyle ^ inheritedCellStyle, int rowIndex, bool includeColors);
public override System.Windows.Forms.DataGridViewCellStyle GetInheritedStyle(System.Windows.Forms.DataGridViewCellStyle inheritedCellStyle, int rowIndex, bool includeColors);
public override System.Windows.Forms.DataGridViewCellStyle GetInheritedStyle(System.Windows.Forms.DataGridViewCellStyle? inheritedCellStyle, int rowIndex, bool includeColors);
override this.GetInheritedStyle : System.Windows.Forms.DataGridViewCellStyle * int * bool -> System.Windows.Forms.DataGridViewCellStyle
Public Overrides Function GetInheritedStyle (inheritedCellStyle As DataGridViewCellStyle, rowIndex As Integer, includeColors As Boolean) As DataGridViewCellStyle

参数

inheritedCellStyle
DataGridViewCellStyle

要填充继承的单元格样式的 A DataGridViewCellStyle

rowIndex
Int32

单元格的父行的索引。

includeColors
Boolean

true 若要在返回的单元格样式中包含继承的颜色,则为 ;否则,为 false.

返回

包含 DataGridViewCellStyle 从单元格的父行、列和 DataGridView继承的单元格的样式设置。

例外

rowIndex 不是 -1。

注解

此方法返回一个从由 /> 和属性返回的对象继承其设置。 有关详细信息,请参阅 Windows 窗体 DataGridView 控件中的单元格样式

适用于

另请参阅