DataGridViewCell.GetInheritedStyle Método

Definição

Tem o estilo aplicado à cela.

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

Parâmetros

inheritedCellStyle
DataGridViewCellStyle

A DataGridViewCellStyle para ser povoado com o estilo célula herdado.

rowIndex
Int32

O índice da linha mãe da célula.

includeColors
Boolean

true incluir as cores herdadas no estilo da célula devolvida; caso contrário, false.

Devoluções

A DataGridViewCellStyle que inclui as definições de estilo da célula herdadas da linha, coluna e DataGridView.

Exceções

A célula não tem .DataGridView

-ou-

ColumnIndex é inferior a 0, indicando que a célula é uma célula de cabeçalho de linha.

rowIndex é menor que 0, ou maior ou igual ao número de linhas no pai DataGridView.

Observações

Este método devolve um DataGridViewCellStyle que herda as suas definições dos DataGridViewCellStyle objetos da linha, coluna e DataGridViewpais da célula. Para mais informações, consulte os estilos de célula no controlo DataGridView do Windows Forms .

Aplica-se a

Ver também