IGridProvider.ColumnCount Propriedade

Definição

Obtém o número total de colunas numa grelha.

public:
 property int ColumnCount { int get(); };
public int ColumnCount { get; }
member this.ColumnCount : int
Public ReadOnly Property ColumnCount As Integer

Valor de Propriedade

O número total de colunas numa grelha.

Exemplos

O seguinte código de exemplo devolve o valor da propriedade.

/// <summary>
/// Gets the count of columns in the grid.
/// </summary>
/// <remarks>
/// gridItems is a two-dimensional array containing columns
/// in the second dimension.
/// </remarks>
int IGridProvider.ColumnCount
{
    get 
    {
        return gridItems.GetUpperBound(1) + 1; ;  
    }
}
''' <summary>
''' Gets the count of columns in the grid.
''' </summary>
''' <remarks>
''' gridItems is a two-dimensional array containing columns
''' in the second dimension.
''' </remarks>
Private ReadOnly Property ColumnCount() As Integer Implements IGridProvider.ColumnCount
    Get
        Return gridItems.GetUpperBound(1) + 1

    End Get
End Property

Observações

Linhas e colunas ocultas, dependendo da implementação do provedor, podem ser carregadas na árvore Automatização da Interface de Utilizador e, por isso, serão refletidas nas propriedades RowCount e ColumnCount. Se as linhas e colunas ocultas ainda não forem carregadas, não serão contabilizadas.

Aplica-se a

Ver também