Selects or deselects a TreeView node in a TreeView DataWindow.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control |
Integer dw_control.SelectTreeNode(long row, long groupLevel, boolean bSelect)
Argument |
Description |
---|---|
dw_control |
A reference to a TreeView-style DataWindow control |
row |
The number of the row that belongs to the group |
groupLevel |
The TreeView level of the group |
bSelect |
Indicates whether the TreeView node is selected or not |
Returns 1 if the SelectTreeNode operation succeeds and one of the following negative values if it fails:
A TreeView DataWindow has several TreeView nodes that can be selected or deselected. You can use the SelectTreeNode method to select or deselect a TreeView node in a TreeView DataWindow that has a particular TreeView level.
The SelectTreeNode method triggers the TreeNodeSelecting and TreeNodeSelected events with a row argument of –1.
The following example selects the node specified by the text box values:
long row
long level
row=long(sle_row.text)
level=long(sle_level.text)
dw_1.SelectTreeNode(row,level,true)