TablePattern.TablePatternInformation.RowCount Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the total number of rows in a table.
public:
property int RowCount { int get(); };
public int RowCount { get; }
member this.RowCount : int
Public ReadOnly Property RowCount As Integer
The total number of rows in a table. The default value is zero.
In the following example, a TablePattern object obtained from a target control is passed into a function that retrieves the current TablePattern property values.
///--------------------------------------------------------------------
/// <summary>
/// Gets the current property values from target.
/// </summary>
/// <param name="tablePattern">
/// A TablePattern control pattern obtained from
/// an automation element representing a target control.
/// </param>
///--------------------------------------------------------------------
private void GetRowColumnCounts(TablePattern tablePattern)
{
if (tablePattern == null)
{
throw new ArgumentException("Target element cannot be null.");
}
Console.WriteLine(tablePattern.Current.RowCount.ToString());
Console.WriteLine(tablePattern.Current.ColumnCount.ToString());
}
'''--------------------------------------------------------------------
''' <summary>
''' Gets the current property values from target.
''' </summary>
''' <param name="tablePattern">
''' A TablePattern control pattern obtained from
''' an automation element representing a target control.
''' </param>
'''--------------------------------------------------------------------
Private Sub GetRowColumnCounts(ByVal tablePattern As TablePattern)
If tablePattern Is Nothing Then
Throw New ArgumentException("Target element cannot be null.")
End If
Console.WriteLine(tablePattern.Current.RowCount.ToString())
Console.WriteLine(tablePattern.Current.ColumnCount.ToString())
End Sub
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: