語言

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

備註

根據提供者實作的不同,隱藏的列和欄可以載入邏輯樹,因此會反映在 RowCount and ColumnCount 屬性中。 如果隱藏的列和欄尚未載入,則不會被計算。

適用於

另請參閱