IGridProvider.ColumnCount Właściwość

Definicja

Pobiera łączną liczbę kolumn w siatce.

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

Wartość właściwości

Całkowita liczba kolumn w siatce.

Przykłady

Poniższy przykładowy kod zwraca wartość właściwości.

/// <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

Uwagi

Ukryte wiersze i kolumny, w zależności od implementacji dostawcy, można załadować do drzewa automatyzacja interfejsu użytkownika i dlatego zostaną odzwierciedlone we właściwościach RowCount iColumnCount. Jeśli ukryte wiersze i kolumny nie zostały jeszcze załadowane, nie zostaną zliczane.

Dotyczy

Zobacz też