DataGridViewColumnHeaderCell.GetInheritedStyle Metoda

Definicja

Pobiera styl zastosowany do komórki.

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

Parametry

inheritedCellStyle
DataGridViewCellStyle

Element DataGridViewCellStyle , który ma zostać wypełniony odziedziczonym stylem komórki.

rowIndex
Int32

Indeks wiersza nadrzędnego komórki.

includeColors
Boolean

true do uwzględnienia odziedziczonych kolorów w zwracanym stylu komórki; w przeciwnym razie , false.

Zwraca

Element DataGridViewCellStyle zawierający ustawienia stylu komórki dziedziczone z wiersza nadrzędnego komórki, kolumny i DataGridView.

Wyjątki

rowIndex nie jest -1.

Uwagi

Ta metoda zwraca DataGridViewCellStyle element, który dziedziczy jego ustawienia z DataGridViewCellStyle obiektów zwracanych przez ColumnHeadersDefaultCellStyle właściwości i DefaultCellStyle .DataGridView Aby uzyskać więcej informacji, zobacz Style komórek w kontrolce DataGridView Windows Forms.

Dotyczy

Zobacz też