PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • How to proceed?
  • Creating a control from a variable in the "Project explorer" pane
  • Remarks
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
Overview
Data binding is used to link the variables in memory to:
  • the controls of a window.
  • the controls of a page.
  • Versions 15 and later
    a report (data source).
    New in version 15
    a report (data source).
    a report (data source).
When creating a control (table, list box, ...), the wizard proposes to link this control to a variable of your project (global variable or variable used in the current window or in the current page).
You can also create and link the control to the variable by dragging and dropping it from the "Project explorer" pane.
Versions 15 and later
When creating a report, the wizard proposes to link the report with a data source of variable type. See Report on variable for more details.
New in version 15
When creating a report, the wizard proposes to link the report with a data source of variable type. See Report on variable for more details.
When creating a report, the wizard proposes to link the report with a data source of variable type. See Report on variable for more details.
How to proceed?

Creating a control from a variable in the "Project explorer" pane

To create a control from a variable in the "Project explorer" pane:
  1. Display the "Project explorer" pane if necessary: on the "Home" pane, in the "Environment" group, expand "Panes" and select "Project explorer".
  2. Use to display in the "Project explorer" pane the element that is currently displayed in the editor. The details of the variables available from the window or page are displayed in the "Project explorer" pane.
  3. Drag the desired variable and drop it in the current window or page:
    • an edit control will be automatically created for a simple variable, a class member, a structure member or an advanced member.
    • a Table control will be automatically created for an Array variable.
    • an edit control will be created for each simple member of class variables, structure variables or advanced variables. For the members corresponding to an advanced type, the Drag and Drop of this member must be performed separately.

Remarks

  • Variables must be dragged from the "Project explorer" pane.
  • For the classes, the created controls are associated with a class instance (which means with a Class variable). To create these controls, you must select the class variable from the variables of the window or page, and not the class from the "Classes" section of the "Project explorer" pane.
  • The "Classes" section in the "Project explorer" pane lists the available class declarations, and not the class instances.
Related Examples:
WD DataBinding Training (WINDEV): WD DataBinding
[ + ] The "WD DataBinding" example explains how to link a control and a WLanguage variable.

This example includes two windows:
- A first window presents a simple link between the controls and a composite variable.
- A second window presents a link between a table control and a WLanguage class as well as the link between the table and a detailed form
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment