CollapseLevel method (DataWindows)
Description
Collapses all the groups in a TreeView DataWindow that have
the specified TreeView level.
Controls
|
DataWindow type |
Method applies to |
|---|---|
|
PowerBuilder |
DataWindow control |
Syntax
[PowerBuilder]
|
1 |
Integer <span>dw_control</span>.<span>CollapseLevel</span> (long <span>groupLevel</span>) |
|
Argument |
Description |
|---|---|
|
dw_control |
A reference to a TreeView-style DataWindow |
|
groupLevel |
The TreeView level of the group to be |
Return Values
Returns 1 if the CollapseLevel operation succeeds and one
of the following negative values if it fails:
-
-1
DataWindow is null
-
-5
One or more of the parameters are invalid
-
-16
DataWindow is not a TreeView DataWindow
Usage
A TreeView DataWindow has several TreeView level bands (groups)
that can be expanded and collapsed. You can use the CollapseLevel method
to collapse all the groups in a TreeView DataWindow that have a
particular TreeView level.
The CollapseLevel method triggers the Collapsing
and Collapsed events with a row argument of –1.
Examples
The following example collapses TreeView level 2:
|
1 |
integer li_ret<br>li_ret = dw_treeview.<span>CollapseLevel</span>(2) |