RowCount Property
Collapse the table of content
Expand the table of content

GridPattern.GridPatternInformation.RowCount Property


Gets the total number of rows in a grid.

Namespace:   System.Windows.Automation
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

public int RowCount { get; }

Property Value

Type: System.Int32

The total number of rows in a grid.

Hidden rows and columns, depending on the provider implementation, may be loaded in the UI Automation tree and will therefore be reflected in the RowCount and ColumnCount properties. If the hidden rows and columns have not yet been loaded they will not be counted.

The default value is 0.

In the following example, an event listener is set up for a grid structure change such as a row or column grid item being added or removed from the grid.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft