ExpandLevel

Description

Expands all the groups in a TreeView DataWindow that have the specified TreeView level.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control

Syntax

PowerBuilder

Integer dw_control.ExpandLevel (long groupLevel)

Argument

Description

dw_control

A reference to a TreeView-style DataWindow control

groupLevel

The TreeView level of the group to be expanded

Returns

Returns 1 if the ExpandLevel 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 ExpandLevel method to expand all the groups in a TreeView DataWindow that have a particular TreeView level.

The ExpandLevel method triggers the Expanding and Expanded events with a row argument of –1.

Examples

Example 1

The following example expands all the groups at TreeView level 2:

integer li_ret
li_ret = dw_treeview.ExpandLevel(2)

See also