Collapse Action (Grid Controls)

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

Description

The Collapse action collapses the specified grid row. The effect is the same as if you clicked the “-” button of the row. The Collapse action does not move the mouse cursor.

Declaration

TestObj.Collapse(Row)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Row [in]    Required    Integer    
Result None

Applies To

The method is applied to the following objects:

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The method has the following parameter:

Row

Specifies the zero-based index of the desired data row. The first visible row has index 0, the second - 1, and so on. The index of the last row is wRowCount - 1.

Result Value

None.

Remarks

If the specified row is not found, Collapse fails and posts an error message to the log.

The script recorder recognizes mouse clicks on the “-” buttons within the rows and records the Collapse command.

Example

To view an example that demonstrates how to use the Collapse action, see Expanding and Collapsing Rows in Infragistics UltraGrid.

See Also

Collapse Action (Specific to DevExpressQuantumGrid Controls)
Collapse Action (Specific to DevExpressXtraVerticalGrid Controls)
Collapse Action (Specific to PropertyGrid Controls)
Expand Action (Grid Controls)

Highlight search results