PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Summary diagram
  • 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
A window or page can display information coming from:
  • a database: the controls are directly bound to the items in the data files or queries available in the database.
  • variables in the application's code (variables global to the window, page or project, class members, etc.).
  • Versions 15 and later
    members or properties of .Net objects.
    New in version 15
    members or properties of .Net objects.
    members or properties of .Net objects.
  • Versions 15 and later
    .Net Object variables (to WLanguage arrays containing.Net Objects).
    New in version 15
    .Net Object variables (to WLanguage arrays containing.Net Objects).
    .Net Object variables (to WLanguage arrays containing.Net Objects).
To display this information in a window or page, the controls in the window or page must be bound to:
  • the different database items.
  • the available WLanguage variables (Data binding).
The method for displaying and retrieving the information is straightforward:
  • The binding between a control and an item or variable can be defined in the window or page editor, in the control description ("Binding" tab).
  • ScreenToFile (or ScreenToSource) is used to update the record or the variable with the data shown on the screen.
    For the pages, you must use PageToFile (or PageToSource).
  • FileToScreen (or SourceToScreen) updates the data displayed on the screen with the data from the record or variable.
    For the pages, you must use FileToPage (or SourceToPage).
Summary diagram
The following diagram shows a summary of the bindings between controls and data:
Remarks
  • When dragging and dropping an item or variable onto a page or window, the corresponding control is automatically created with the corresponding binding.
    For more details on data binding, see Data binding from the "Project explorer" pane.
  • Most types of controls can be bound to an item in a data file or variable. See the documentation about this type of control for more details.
  • Data binding on Table controls requires special management: the method for managing the tables on source differs from the method for managing the browsing tables. For more details, see Specific features of data binding on Table controls.
  • Limitations:
    • Two-dimensional WLanguage arrays cannot be used for data binding.
    • Associative arrays cannot be used for data binding.
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