|
- Managing a sorted TreeView Table control
TableSortChild (Function) In french: TableTrieFils Sorts a branch in a TreeView Table control on one or more columns.
// Tri des colonnes "Désignation" et "Prix" dans le champ "TABLEH_Produit" // La colonne "Désignation" est triée dans l'ordre croissant // La colonne "Prix" est triée dans l'ordre décroissant TableSortChild(TABLEH_Produit, Null, "Désignation", "-Prix")
// Tri de la branche selon le prix décroissant TableSortChild(TABLEH_Produit, "Plomberie" + TAB + "Robinets", "Désignation", "-Prix")
Syntax
Sorting a branch in a TreeView Table control on one or more columns identified by their name. Hide the details
<Result> = TableSortChild(<TreeView Table control> , <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 TreeView Table control to use.
If this parameter corresponds to an empty string (""), the control to which the current event belongs will be used. <Branch to sort>: Integer or character string If this parameter is an integer, it corresponds to the subscript of parent containing the branch to sort. 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: "[<Sense>]<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: "[<Sense>]<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: "[<Sense>]<Column name>" where:- <Direction> (character) indicates the sort direction:
- "+": ascending sort (by default),
- "-": descending sort.
- <Column name> (character string): name of column to sort.
Sorting a branch in a TreeView Table control according to a list of column names Hide the details
<Result> = TableSortChild(<List of columns> , <Branch to sort>)
<Result>: Boolean - True if the sort was performed,
- False otherwise.
<List of columns>: Character string List of columns to sort (up to 16 columns). This parameter has the following format:"[<Sense>]<Name of column1> + TAB + [<Sense>]<Name of column2> + TAB + ..." where: - <Direction> (character) indicates the sort direction:
- "+": ascending sort (by default),
- "-": descending sort.
- <Column name> (character string): name of column to sort. The name of a column can be obtained with the function TableEnumersColumn.
<Branch to sort>: Integer or character string If this parameter is an integer, it corresponds to the subscript of parent containing the branch to sort. 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.
Sorting a branch in a TreeView Table control on the first ten visible columns Hide the details
<Result> = TableSortChild(<TreeView Table control> , <Branch to sort> [, <To sort>])
<Result>: Boolean - True if the sort was performed,
- False otherwise.
<TreeView Table control>: Control name Name of TreeView Table control to sort. This parameter has the following format:"[<Direction>]<TreeView Table control>" where: - <Direction> (character) indicates the sort direction:
- "+": ascending sort (by default),
- "-": descending sort.
- <TreeView Table control> (character string): name of TreeView Table control to sort.
<Branch to sort>: Integer or character string If this parameter is an integer, it corresponds to the subscript of parent containing the branch to sort. 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. <To sort>: Optional boolean Remarks Managing a sorted TreeView Table control - When a TreeView Table control is sorted by TableSortChild, the additions performed by TableAdd, TableAddLine, TableAddChild, TableInsert, TableInsertLine or TableInsertChild take the sort into account.
- When an TreeView Table control is sorted by a mouse click, the additions to the field made by the functions TableAdd, TableAddLine, TableAddChild, TableInsert, TableInsertLine or TableInsertChild do not take into account the sorting.
- The sort is not canceled by TableDisplay, TableAjust, TableSearch, TableCount, TablePosition, TableSelect, TableSelectMinus, TableSelectPlus, TableDelete and TableDeleteAll.
- The sort is canceled:
Business / UI classification: UI Code
This page is also available for…
|
|
|
|
|
|
|