- Managing a sorted TreeView Table control
<TreeView Table>.SortChild (Function) In french: <Table hiérarchique>.TrieFils Sorts a branch in a TreeView Table control on one or more columns.
// Sort the "Designation" and "Price" columns in the "TVT_Product" control // The "Designation" column is sorted in ascending order // The "Price" column is sorted in descending order TVT_Product.SortChild(Null, "Designation", "-Price")
// Sort the branch in descending order TVT_Product.SortChild("Plumbing" + TAB + "Faucets", "Designation", "-Price")
Syntax
Sorting a branch in a TreeView Table control on one or more columns identified by their name. Hide the details
<Result> = <TreeView Table control>.SortChild(<Branch to sort> , <Name of column 1> [, <Name of column 2> [... [, <Name of column N>]]])
<Result>: Boolean - True if the sort was performed,
- False otherwise.
<TreeView Table control>: Control name Name of the TreeView Table control to be used. <Branch to sort>: Integer or character string If this parameter is an integer, it corresponds to the index of the parent containing the branch to be sorted. If this parameter corresponds to NULL, the sort is performed on the "Root" elements. If this parameter corresponds to a character string, it corresponds to the parent element containing the branch to sort. <Name of column 1>: Character string Name of first column to sort (up to 16 columns). This parameter has the following format: "[<Direction>]<Column name>" where:- <Direction> (character) indicates the sort direction:
- "+": ascending sort (by default),
- "-": descending sort.
- <Column name> (character string): name of column to sort.
<Name of column 2>: Optional character string Name of the second column to sort (up to 16 columns). This parameter has the following format: "[<Direction>]<Column name>" where:- <Direction> (character) indicates the sort direction:
- "+": ascending sort (by default),
- "-": descending sort.
- <Column name> (character string): name of column to sort.
<Name of column N>: Optional character string Name of the Nth column to sort (up to 16 columns). This parameter has the following format: "[<Direction>]<Column name>" where:- <Direction> (character) indicates the sort direction:
- "+": ascending sort (by default),
- "-": descending sort.
- <Column name> (character string): name of column to sort.
Remarks Managing a sorted TreeView Table control - When a TreeView Table control is sorted by <TreeView Table>.SortChild, the additions performed by <Table>.Add, <Table>.AddLine, <TreeView Table>.AddChild, <Table>.Insert, <Table>.InsertLine or <TreeView Table>.InsertChild take the sort into account.
- When a TreeView Table control is sorted by clicking, the additions made by <Table>.Add, <Table>.AddLine, <TreeView Table>.AddChild, <Table>.Insert, <Table>.InsertLine or <TreeView Table>.InsertChild ignore the sort.
- The sort is not canceled by <Table>.Display, <Table>.Adjust, TableSearch, <Table>.Count, <Table>.Position, <Table>.Select, <Table>.SelectMinus, <Table>.SelectPlus, <Table>.Delete and <Table>.DeleteAll.
- The sort is canceled:
This page is also available for…
|
|
|
|