DataGridViewColumnHeaderCell.GetInheritedStyle Methode

Definition

Ruft die Formatvorlage ab, die auf die Zelle angewendet wird.

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

Parameter

inheritedCellStyle
DataGridViewCellStyle

A DataGridViewCellStyle , das mit der geerbten Zellenformatvorlage aufgefüllt werden soll.

rowIndex
Int32

Der Index der übergeordneten Zeile der Zelle.

includeColors
Boolean

trueum geerbte Farben in die zurückgegebene Zellenformatvorlage einzuschließen; andernfalls . false

Gibt zurück

Ein DataGridViewCellStyle Element, das die Formatvorlageneinstellungen der Zelle enthält, die von der übergeordneten Zeile, Spalte und der DataGridViewZelle geerbt wurde.

Ausnahmen

rowIndex ist nicht -1.

Hinweise

Diese Methode gibt eineDataGridViewCellStyle, die ihre Einstellungen von den DataGridViewCellStyle objekten erbt, die von den ColumnHeadersDefaultCellStyle und DefaultCellStyle Eigenschaften der .DataGridView Weitere Informationen finden Sie unter Zellenstile im DataGridView-Steuerelement in Windows Forms.

Gilt für:

Weitere Informationen