ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Table functions
  • Managing a sorted TreeView Table control
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
<TreeView Table>.SortChild (Function)
In french: <Table hiérarchique>.TrieFils
Sorts a branch in a TreeView Table control on one or more columns.
Example
// 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
TABLEH_Produit.TrieFils(Null, "Désignation", "-Prix")
// Tri de la branche selon le prix décroissant
TABLEH_Produit.TrieFils("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> = <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 sorting (default),
    • "-": sorting in descending order.
  • <Nom de la colonne> (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 sorting (default),
    • "-": sorting in descending order.
  • <Nom de la colonne> (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 sorting (default),
    • "-": sorting in descending order.
  • <Nom de la colonne> (string): name of column to sort.
Remarks

Managing a sorted TreeView Table control

Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help