wRowCount Property (Grid Controls)

Applies to TestComplete 15.47, last modified on January 20, 2023
This property is not supported in web tests (including cross-platform web tests) that use XPath expressions and CSS selectors to locate web elements. This property can be only used in tests that locate web objects by using internal identification properties provided by TestComplete.

Description

Use the wRowCount property to determine the number of rows in the given object.

Declaration

TestObj.wRowCount

Read-Only Property Integer
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following objects:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Property Value

The total number of rows.

Borland TDBGrid objects:

The wRowCount property value only includes those rows that are currently visible in the grid. It does not include rows that are situated above and below the visible area.

DevExpressXtraGridView objects:

If the data displayed by the XtraGrid control is grouped by one or several columns, data rows can be hidden under collapsed groups. The wRowCount property returns the number of all data rows in the specified grid view, whether they are currently visible or hidden. The returned value does not include group rows.

Syncfusion Essential Grid (GridGroupingControl) objects:

For a grouped table or a group that has child groups, the wRowCount property returns 0. To access data rows in a grouped table, you should first use the wGroup property to get a SyncfusionEssGridView object corresponding to a particular group. Using the properties and methods of the obtained object, you can work with rows that belong to that group.

Remarks

You can use the wRowCount property along with wColumnCount and wValue to iterate through grid cells.

Borland String Grid, Borland TDBGrid objects:

To work with the wRowCount property, TestComplete must have access to internal methods and properties of the Borland grid control. For this purpose, the VCL Control Support plugin must be installed and enabled, and the tested application must be compiled with debug information (see Implementing Debug Info Agent™ Support in Applications).

Note that TestComplete does not support access to internal properties and methods of VCL controls in 64-bit C++Builder applications. Therefore, the property is inaccessible when testing Borland grid controls in such applications.

The property can also be unavailable to your scripts if it is not used in the application code - Smart Linker just removes it during compilation, since there are no references to it. To solve the problem, make sure the property is used in the application’s source code. For instance, you can add a virtual method to your application that calls the desired property (the compiler does not exclude virtual methods). For detailed information, see Object Properties, Fields and Methods That Are Unavailable to TestComplete.

Example

To view an example that demonstrates how to use the wRowCount property, see Obtaining Selected Records in Microsoft DataGrid.

See Also

wRowCount Property (Specific to DevExpressQuantumGrid Controls)
wColumnCount Property (Grid Controls)

Highlight search results