Description
Collapses a group in a TreeView DataWindow that has the specified TreeView level and includes the specified row; also collapses all the group's children.
Applies to
Syntax
PowerBuilder
Integer dw_control.ExpandAllChildren(long row, long groupLevel)
| 
                               Argument  | 
                           
                               Description  | 
                        
|---|---|
| 
                               dw_control  | 
                           
                               A reference to a TreeView-style DataWindow control  | 
                        
| 
                               row  | 
                           
                               The number of the row that belongs to the group to be collapsed  | 
                        
| 
                               groupLevel  | 
                           
                               The TreeView level of the group to be collapsed  | 
                        
Return value
Returns 1 if the expand 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 CollapseAllChildren method to collapse a group with a specified TreeView level in a TreeView DataWindow and all of its children.
The CollapseAllChildren method triggers the Collapsing and Collapsed events.
Examples
The following example collapses the group in a TreeView DataWindow that has TreeView level 2 and includes row 3 and all the group's children:
integer li_ret li_ret = dw_treeview.CollapseAllChildren(3,2)
See also


