AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control TreeView
  • Overview
  • How to?
  • Create a TreeView control linked to a data file
  • "Populate sub-levels dynamically" option
  • Manipulating a TreeView control based on a data file
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
It is possible to create TreeView control fields directly linked to the data..
You can create a TreeView control File TreeView control: the TreeView control will be linked to a data file or a query.
TreeView control programming has been greatly simplified: you no longer need to use the Arbrexxx.
How to?

Create a TreeView control linked to a data file

To create a TreeView control linked to a data file:
  1. Create a TreeView control (on the "Creación" tab, in the "Datos" group, click "TreeView").
  2. Open the control description window (select "Description" in the context menu).
  3. In the "Content" tab, select "Data file/Survey".
  4. Click "Add". A "<None>" data source is automatically added.
  5. Define the characteristics of this source:
    • Source: corresponds to the name of the data file or query to be browsed.
    • Route: corresponds to the route key used to browse the source.
    • Displayed: corresponds to the item displayed in the TreeView control.
  6. Add (if necessary) a second source for the next level ("Add" button). In this case, you have the ability to define the source of the link for the previous level.
    For example, if the first level loops through the Customer data file, the second one can loop through the Orders data file. The items that will be used to set the relation 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.
  7. Define as many sources as necessary.
    Special case: TreeView control linked to a recursive data file
    A Tree field linked to a data file can display records dependent on the previous record (a classic case of a recursive link allowing, for example, to manage parents/children).
    To manage this type of TreeView control, a reflexive link can be defined in the "Contents" tab of the TreeView control description window.
  8. Validate the TreeView control description window. The TreeView control is now linked to a data file.
WINDEV

"Populate sub-levels dynamically" option

When a TreeView control linked to a data file has many elements and sub-elements, it can take a long time to fill in all the elements.
The "Rellenar subniveles dinámicamente (más rápido)" option populates each sub-level only when the user expands a level. The population time is optimized and it takes less time to populate the control the first time.
Note To use this option on a TreeView control populated programmatically, use the AddChildDelayed property.
Manipulating a TreeView control based on a data file
A TreeView control linked to a data file is very easy to handle:
  • If the TreeView control can be edited, the changes made to the control are automatically reflected to the bound data source.
  • If the TreeView control does not allow user input, the bound data source will not be modified.
Versión mínima requerida
  • Versión 16
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 08/01/2025

Señalar un error o enviar una sugerencia | Ayuda local