ExpandGroup Action (Grid Controls)

Applies to TestComplete 14.70, last modified on April 22, 2021
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

Depending on the Expand parameter, the ExpandGroup action expands or collapses the specified grid group. The effect is the same as when you click the “+” (or “-”) button of the group. However, the ExpandGroup action does not move the mouse cursor.

Declaration

TestObj.ExpandGroup(GroupExpand)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Group [in]    Required    Integer    
Expand [in]    Optional    Boolean Default value: True   
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 parameters:

Group

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

Expand

Specifies whether to expand or collapse the group.

Result Value

None.

Remarks

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

The script recorder recognizes mouse clicks on the “+” buttons within the control groups and records the ExpandGroup command.

To collapse the group, you can either call the CollapseGroup action or call ExpandGroup with the Expand parameter set to False.

Example

To view an example that demonstrates how to use the ExpandGroup action, see Expanding and Collapsing Rows in Syncfusion GridGroupingControl.

See Also

CollapseGroup Action (Specific to DevExpressQuantumGrid Controls)
CollapseGroup Action (Grid Controls)

Highlight search results