IGridProvider.RowCount 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得格子中總列數。
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 屬性中。 如果隱藏的列和欄尚未載入,則不會被計算。