IGridProvider.RowCount 屬性

定義

取得方格的資料列總數。

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

屬性值

方格的資料列總數。

範例

下列範例程式碼會傳回 屬性值。

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

備註

根據提供者實作而定,隱藏的資料列和資料行可以在邏輯樹狀結構中載入,因此會反映在 和 ColumnCount 屬性中 RowCount 。 如果尚未載入隱藏的資料列和資料行,則不會計算。

適用於

另請參閱