PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Binding between a control and a WLanguage variable or between a control and an item of a data file
  • Binding to an item: types of bindings
  • Miscellaneous
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
Automatically updates the controls in a window or page with:
  • the values of the bound items in the current record (loaded in memory) of the HFSL data file described in the data model editor. This operation is performed regardless of the state of the controls (grayed, inactive or invisible).
  • the values of the bound WLanguage variables. This operation is performed regardless of the state of the controls (grayed, inactive or invisible).
PHP Only the binding to the items of a data file is supported. Bindings to WLanguage variables are not supported in this version.
Remark: <Window>.FromSource does not read records on the data file. The value of the record loaded in memory is used to update the controls. Therefore, a record must be loaded in memory previously:
Versions 16 and later
WINDEVLinux This function is now available for WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for WINDEV applications in Linux.
WINDEVLinux This function is now available for WINDEV applications in Linux.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 22 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Android This function is now available for Android applications.
WINDEVJava This function is now available for Java applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 22
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Android This function is now available for Android applications.
WINDEVJava This function is now available for Java applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Android This function is now available for Android applications.
WINDEVJava This function is now available for Java applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Example
HReadSeekFirst(CUSTOMER, NAME, "PAUL")
IF HFound() = True THEN
WIN_Customer.FromSource()
END
 
// Read the record and
// update the controls with the values from the items
HReadFirst(CUSTOMER, NAME)
WIN_Customer.FromSource()
Syntax
<Window>.FromSource([<Source>])
<Window>: Window name
Name of the window or page containing the controls to be updated.
If this parameter is not specified or is an empty string (""), the window of the current code is used.
<Source>: Optional character string (with quotes)
Name (in quotation marks) of the source the controls to be updated are bound to. This source can be:
  • The name of a data file: only the controls bound to the items of the data file are taken into account.
  • The name of a WLanguage variable: only the controls bound to the WLanguage variable are taken into account.
    Remarks:
    • If the name of the variable is enclosed in quotes, the control will be bound to the specified variable.
    • If the name of the variable is not enclosed in quotes, the control will be bound to the variable data (e.g., a variable containing the name of another variable).
If this name is not specified, all the window controls bound to an item of a data file described in the data model editor or to a WLanguage variable will be taken into account.
Remarks

Binding between a control and a WLanguage variable or between a control and an item of a data file

The binding between a control and a WLanguage variable or between a control and an item of a data file can be determined:
  • In the editor, in the control description window ("Binding" tab).
  • In the code, with the DataBinding property.

Binding to an item: types of bindings

There are two types of bindings between a control and an item
  • direct binding: In this case, <Window>.FromSource transfers the value of the items from the record loaded in memory to the bound control, without reading any values.
  • binding by reading the records in the associated data file.

Miscellaneous

  • Auto-filled Combo Box control bound to an HFSQL data file: <Window>.FromSource must not be in the window "Global declarations" event. The function must be in the "Initializing" event of the window.
  • Space characters in HFSQL items are kept.
  • <Window>.FromSource updates Image controls with the value of the bound image memo items.
  • <Window>.FromSource supports the NULL value. If the item content is NULL, an empty string will be displayed in the bound Edit control. To modify this display mode, use ControlError.
  • <Window>.FromSource is not available on views. The values of the items must be assigned to each control.
Component: wd260obj.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment