SortAll – PB Docs 2017

SortAll

PowerScript function

Description

Sorts all the levels below an item in the TreeView item
hierarchy.

Applies to

TreeView controls

Syntax

Argument

Description

treeviewname

The TreeView control in which you want to sort the
subsequent levels in an item’s hierarchy.

itemhandle

The item for which you want to sort all the levels below
it.

sorttype

The sort method you want to use. Values are:

Ascending!

Descending!

Unsorted!

UserDefinedSort!

Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs.

Usage

If you specify UserDefinedSort! as your sorttype, define your sort
criteria in the Sort event of the TreeView control.

The SortAll function cannot sort level 1 of a TreeView. However,
level 1 is sorted automatically when the TreeView’s SortType property
calls for sorting.

Examples

This example sorts the subsequent levels recursively under the
current TreeView item:

This example recursively sorts the entire TreeView control:

See also

Sort


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x