Share via


DataGridViewCell.GetInheritedStyle Metoda

Definice

Získá styl použitý na buňku.

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

Parametry

inheritedCellStyle
DataGridViewCellStyle

Objekt , DataGridViewCellStyle který se má naplnit zděděným stylem buňky.

rowIndex
Int32

Index nadřazeného řádku buňky

includeColors
Boolean

truezahrnout zděděné barvy ve vráceném stylu buňky; v opačném případě . false

Návraty

A DataGridViewCellStyle , který zahrnuje nastavení stylu buňky zděděné z nadřazeného řádku buňky, sloupce a DataGridView.

Výjimky

Buňka nemá přidruženou žádnou .DataGridView

-nebo-

ColumnIndex je menší než 0, což znamená, že buňka je buňkou záhlaví řádku.

rowIndex je menší než 0 nebo větší nebo roven počtu řádků v nadřazeném objektu DataGridView.

Poznámky

Tato metoda vrátí objekt DataGridViewCellStyle , který dědí nastavení z DataGridViewCellStyle objektů nadřazeného řádku buňky, sloupce a DataGridView. Další informace najdete v tématu Styly buněk v ovládacím prvku model Windows Forms DataGridView.

Platí pro

Viz také