IGridProvider.RowCount 属性

定义

获取网格中的总行数。

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

属性值

Int32

网格中的总行数。

示例

以下示例代码返回属性值。

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

注解

隐藏的行和列,具体取决于提供程序实现,可以在逻辑树中加载,因此会反映在属性ColumnCountRowCount。 如果隐藏的行和列尚未加载,则不会进行计数。

适用于

另请参阅