Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView Table functions
  • Use conditions
  • Branch to collapse
  • Selection bar
  • Runtime speed for the TreeView Table controls
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
  • a break that was previously expanded in a Table control. The break elements are no longer visible in the Table control.
Reminder: At runtime, a node is collapsed when the node name is preceded by "+".
// Collapses the break of the current row in the "TABLE_Break" Table control
TableCollapse(TABLE_Break, TABLE_Break)

Table with breaks: Collapsing a break Hide the details

TableCollapse(<Table control> [, <Row number> [, <Name of break>]])
<Table control>: Control name
Name of the Table control to be used. This control must have one or more breaks. Otherwise, this function has no effect.
<Row number>: Optional integer
Number of the break row to collapse. This number must correspond either to the number of the current row or to the number of the first row of break to collapsed. If this parameter is not specified, the break of current row is collapsed.
<Name of break>: Optional character string
Name of break to collapse. This parameter must be specified in case of nested breaks. It allows the break that will be collapsed to be defined. By default, no break is collapsed if the breaks are nested.

Use conditions

TableCollapse can be used on:
  • a Table or TreeView Table with in-memory data source.
  • a Table or TreeView Table control populated programmatically.
This function cannot be used on the Table controls based on a data file (direct access).

Branch to collapse

TableCollapse has no effect:
TreeView Table controlTable control with breaks
  • if the branch to collapse is not found.
  • if the branch to collapse is a leaf.
  • if the branch to collapse is already collapsed.
  • if the Table control contains no break.
  • if the Table control contains several breaks and the break to collapse is not specified.
  • if no row is selected in the Table control and if <Row number> is not specified.

Note for the TreeView Table controls: If <Row number> or <Branch name> corresponds to the branch in the first row, the entire hierarchy of the TreeView Table control is collapsed (equivalent to TableCollapseAll).

Selection bar

For the TreeView Table controls:
  • If the selection bar was positioned on one of the elements of the node to collapse, it is positioned on the collapsed node after the call to TableCollapse.
  • The modification code is called whenever the selection bar is moved. If two levels are collapsed and if the selection bar is positioned on the higher node, the modification codes of each level are run.
For the Table controls with breaks, the selection bar is not modified. It stays on the current element even if the break is collapsed.

Runtime speed for the TreeView Table controls

The runtime speed of syntax 1 is faster than the runtime speed of syntax 2.
Business / UI classification: UI Code
Component: wd280obj.dll
Minimum version required
  • Version 11
This page is also available for…
Click [Add] to post a comment

Last update: 06/21/2022

Send a report | Local help