ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / TreeView Table control
  • Overview
  • How to?
  • Creating a TreeView Table control based on a variable
  • Creating a TreeView Table control based on a variable
  • Defining the data sources of the TreeView Table control
  • Defining the bindings of the different columns in the TreeView Table control based on a variable
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
TreeView Table control based on a variable
Overview
A TreeView Table control based on a variable is a control bound to a variable or a set of variables.
How to?
WINDEV

Creating a TreeView Table control based on a variable

To create a TreeView Table control based on a variable:
  1. On the "Creation" tab, in the "Data" group, expand "Table and List Box" and select "TreeView Table".
  2. Click at the desired location to create the control.
  3. Go to the "Content" tab of the TreeView Table control description window. Select the population mode: "From a variable".
    Populate with data from variable
    In this tab you can choose the data source of the TreeView Table control. A TreeView Table control based on a variable is bound to different data sources, used to display nested records.
  4. If necessary, define the bindings of the different columns of the TreeView Table control.
WEBDEV - Server code

Creating a TreeView Table control based on a variable

To create a TreeView Table control based on a variable:
  1. On the "Creation" tab, in the "Data" group, expand "Table and List Box" and select "TreeView Table".
  2. The TreeView Table control creation wizard starts.
  3. In the wizard, select "Display data from an existing variable". Go to the next step.
  4. Define the different data sources of the TreeView Table control. A TreeView Table control based on a variable is bound to different sources, used display nested records.
    Data sources by level
Remark: If this data is not specified in the wizard, it can be defined later in the "Content" tab of the control.

Defining the data sources of the TreeView Table control

To define the data source of the TreeView Table control:
  1. Click the "Add" button. A "<None>" data source is automatically added.
  2. Define the characteristics of this source:
    • Source: corresponds to the variable that will be iterated over (e.g., advanced variables such as Google, RSS, etc.).
    • Browse: corresponds to the variable used to iterate over the source.
    • Display: corresponds to the variable displayed in the first column of the TreeView Table control.
      WEBDEV - Server code Remark: For each level, you can customize the collapsed and the expanded image.
  3. If necessary, define the source of the link of the previous level. For example, if the first level iterates over the garrCustomer variable, the second one can iterate over the garrCustomer.Order variable.
  4. Define as many sources as necessary.
The first column of the TreeView Table control displays the "displayed" data from the selected sources.

Defining the bindings of the different columns in the TreeView Table control based on a variable

By default, the first column of the TreeView Table control (i.e., the column that represents the hierarchy) displays the elements specified in the data sources ("Content" tab, value to "Display" of the different sources).
The TreeView Table control can also display other data in its other columns.
To define the bindings of the different columns:
  1. If necessary, create a new column ("New" in the description window of the TreeView Table control) or select an existing column.
  2. Go to the "Binding" tab and define the desired data binding.
    Remark: The binding includes one of the source variables of the TreeView Table control. If one of the elements displayed in the TreeView Table control is modified, these changes are automatically reflected in the bound variable.
  3. Validate.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/03/2022

Send a report | Local help