DataGridViewColumnHeaderCell.GetInheritedStyle Método

Definição

Obtém o estilo aplicado à célula.

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

Parâmetros

inheritedCellStyle
DataGridViewCellStyle

Um DataGridViewCellStyle a ser populado com o estilo de célula herdado.

rowIndex
Int32

O índice da linha pai da célula.

includeColors
Boolean

true para incluir cores herdadas no estilo de célula retornado; caso contrário, false.

Retornos

DataGridViewCellStyle

Um DataGridViewCellStyle que inclui as configurações de estilo da célula herdado da linha, coluna e DataGridView da pai da célula.

Exceções

rowIndex não é -1.

Comentários

Esse método retorna um DataGridViewCellStyle que herda suas configurações dos DataGridViewCellStyle objetos retornados pela propriedade e DefaultCellStyle DataGridViewpelo ColumnHeadersDefaultCellStyle . Para obter mais informações, consulte Estilos de célula no controle DataGridView dos Windows Forms.

Aplica-se a

Confira também