IGridProvider.ColumnCount Propiedad

Definición

Obtiene el número total de columnas de una cuadrícula.

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

Valor de propiedad

Número total de columnas de una cuadrícula.

Ejemplos

El código de ejemplo siguiente devuelve el valor de propiedad.

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

Comentarios

Las filas y columnas ocultas, en función de la implementación del proveedor, se pueden cargar en el árbol automatización de la interfaz de usuario y, por lo tanto, se reflejarán en las RowCount propiedades y ColumnCount . Si las filas y columnas ocultas aún no se han cargado, no se contarán.

Se aplica a

Consulte también