CollapseAll

Description

Collapses all groups in a TreeView DataWindow.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control

Syntax

PowerBuilder

Integer dw_control.CollapseAll( )

Argument

Description

dw_control

A reference to a TreeView-style DataWindow control

Returns

Returns 1 if the CollapseAll operation succeeds and one of the following negative values if it fails:

Usage

A TreeView DataWindow has several TreeView level bands (groups) that can be expanded and collapsed. You can use the CollapseAll method to collapse all groups in a TreeView DataWindow.

The CollapseAll method triggers the Collapsing and Collapsed events with row and level arguments of –1.

Examples

Example 1

The following example collapses all groups:

integer li_ret
li_ret = dw_treeview.CollapseAll()

See also