PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • How to?
  • Creating a browsing TreeView Table control
  • Creating a browsing TreeView Table control
  • Defining the sources for the browsing TreeView Table control
  • Defining the bindings for the columns of the browsing TreeView Table control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The browsing TreeView Table control
Overview
A browsing TreeView Table control is a TreeView Table bound to a data file or query. In this case, the TreeView Table can only be bound to a data file or a query loaded in memory.
Versions 18 and later
WEBDEV - Server codeWindowsLinux The TreeView Table control is now available for WEBDEV sites.
PHP The TreeView Table control is now available for PHP sites.
New in version 18
WEBDEV - Server codeWindowsLinux The TreeView Table control is now available for WEBDEV sites.
PHP The TreeView Table control is now available for PHP sites.
WEBDEV - Server codeWindowsLinux The TreeView Table control is now available for WEBDEV sites.
PHP The TreeView Table control is now available for PHP sites.
How to?
WINDEVWINDEV Mobile

Creating a browsing TreeView Table control

To create a browsing TreeView Table control:
  1. In the ribbon:
    • WINDEV On the "Creation" tab, in the "Data" group, expand "Table and List Box" and select "TreeView Table".
    • WINDEV Mobile On the "Creation" tab, in the "Data" group, expand "Table" and select "TreeView Table".
  2. Click at the desired location to create the control.
  3. Open the "Content" tab of the Table control description.
    Content tab of TreeView Table control
    This tab is used to define the different sources of the TreeView Table control. A browsing TreeView Table control is bound to different sources, used to display nested records.
    Select the fill mode: "File/Query".
  4. If necessary, define the bindings of the different columns of the TreeView Table control.
Versions 19 and later
WINDEV "Delayed fill of sub-levels" option
When a browsing TreeView Table control includes several elements and sub-elements, its entire fill may be quite long.
The "Delayed fill of sub-levels (faster)" option is used to fill each sub-level only when the user clicks to expand a level. In this case, the filling time is spread out and the initial fill is much faster.
Remark: To use this option on a TreeView Table control filled by programming, call AddChildDelayed.
New in version 19
WINDEV "Delayed fill of sub-levels" option
When a browsing TreeView Table control includes several elements and sub-elements, its entire fill may be quite long.
The "Delayed fill of sub-levels (faster)" option is used to fill each sub-level only when the user clicks to expand a level. In this case, the filling time is spread out and the initial fill is much faster.
Remark: To use this option on a TreeView Table control filled by programming, call AddChildDelayed.
WINDEV "Delayed fill of sub-levels" option
When a browsing TreeView Table control includes several elements and sub-elements, its entire fill may be quite long.
The "Delayed fill of sub-levels (faster)" option is used to fill each sub-level only when the user clicks to expand a level. In this case, the filling time is spread out and the initial fill is much faster.
Remark: To use this option on a TreeView Table control filled by programming, call AddChildDelayed.
Versions 18 and later
WEBDEV - Server code

Creating a browsing TreeView Table control

To create a browsing TreeView Table control:
  1. On the "Creation" tab, in the "Data" group, expand "Table" and select "TreeView Table".
  2. The TreeView Table creation wizard starts.
  3. In the wizard, select "Display the data from an existing file or query". Go to the next step.
  4. Define the different sources of the TreeView Table. A browsing TreeView Table is bound to different sources, used to display nested records.
    Sources of tree structure (wizard for control creation)
Remark: If this information is not specified in the wizard, the data can be modified in the control "Content" tab.
New in version 18
WEBDEV - Server code

Creating a browsing TreeView Table control

To create a browsing TreeView Table control:
  1. On the "Creation" tab, in the "Data" group, expand "Table" and select "TreeView Table".
  2. The TreeView Table creation wizard starts.
  3. In the wizard, select "Display the data from an existing file or query". Go to the next step.
  4. Define the different sources of the TreeView Table. A browsing TreeView Table is bound to different sources, used to display nested records.
    Sources of tree structure (wizard for control creation)
Remark: If this information is not specified in the wizard, the data can be modified in the control "Content" tab.
WEBDEV - Server code

Creating a browsing TreeView Table control

To create a browsing TreeView Table control:
  1. On the "Creation" tab, in the "Data" group, expand "Table" and select "TreeView Table".
  2. The TreeView Table creation wizard starts.
  3. In the wizard, select "Display the data from an existing file or query". Go to the next step.
  4. Define the different sources of the TreeView Table. A browsing TreeView Table is bound to different sources, used to display nested records.
    Sources of tree structure (wizard for control creation)
Remark: If this information is not specified in the wizard, the data can be modified in the control "Content" tab.

Defining the sources for the browsing TreeView Table control

To define the sources of the browsing TreeView Table control:
  1. Click the "Add" button. A "<None>" source is automatically added.
  2. Define the characteristics of this source:
    • Source: corresponds to the data file or to the query that will be browsed.
    • Browse: corresponds to the search key used to browse the source.
    • Displayed: corresponds to the item displayed in the first column of the TreeView Table control.
      WEBDEV - Server code Remark: For each level, you have the ability to customize the collapsed image and the expanded image.
  3. If necessary, define the source of the link of the previous level. For example, if the first level browses the Customer data file, the second one can browse the Orders data file for example. The items that will be used to set the link are "Customer.CustomerID" and "Orders.CustomerID". By default, the source of the link is automatically deduced from the items and links defined in the analysis.
  4. Define as many sources as necessary.
The first column of the TreeView Table control displays the "Displayed" data from the selected sources.
Special case: Recursive browsing TreeView Table
A browsing TreeView Table control can display records that depend on the previous record (standard case of a recursive relationship to manage parents / children, for example)
Example of recursive TreeView Table
To use this type of TreeView Table, you can set a reflexive relationship in the "Content" tab of the control description window.
The "root" rows are associated with a record for which the bound item corresponds to 0 or empty (according to the type of item).

Defining the bindings for the columns of the browsing TreeView Table control

By default, the first column of the browsing TreeView Table control (column representing the hierarchy) displays the elements specified in the sources ("Content" tab, "Displayed" value 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. Create a new column if necessary ("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. The binding can be:
    • single-file: in this case, the binding can be set to one of the source files of the TreeView Table control.
      If one of the records displayed by the TreeView Table control is modified, this modification is automatically applied to the associated data file.
    • multi-file: in this case, the binding can be set to a data file related to a source file.
      If one of the records displayed by the TreeView Table control is modified, this modification will not be automatically applied to the associated data file. It must be managed by programming.
  3. Validate.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment