ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • ListView control
  • Display error
  • Limitations
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
From version 26, FileLink is kept for backward compatibility. This property has been replaced with DataBinding.
The DataBinding property is used to identify and change the binding between a control and:
  • and a data file item.
  • and a variable.
  • and several variables (in this case, each variable can be bound to a different property of the control).
Reminder: Linking a field to an item or variable is normally defined in the window or page editor, in the field description ("Linking" tab).. This binding allows you to specify the data file item that will be used by the synchronization functions (ScreenToFile, ScreenToSource, PageToFile, PageToSource, FileToScreen, FileToPage, SourceToScreen, SourceToPage).
Example of multi-file binding:
'Binding' tab of the control description
This property is equivalent to the ControlAlias function.
Example
// Relie le champ SAI_Saisie1 avec la rubrique Nom du fichier de données Client
SAI_Saisie1.LiaisonFichier = "Client.Nom"
// Idem, mais à partir du fichier de données Commande avec 1 liaison
SAI_Saisie2.LiaisonFichier = "Commande.IDClient" + TAB + "Client.IDClient:Nom"
// Idem, mais à partir du fichier de données LigneCmd avec 2 liaisons
SAI_Saisie3.LiaisonFichier = "LigneCmd.IDCmd" + TAB + ...
		"Commande.IDCmd:IDClient" + TAB + "Client.IDClient:Nom"
// Relie le champ Table TABLE_Table1 avec le tableau Tableau_Mois
TABLE_Table1.LiaisonFichier = ":Tableau_Mois"
// Mise à jour à l'écran
FileToScreen()
// A chaque appel de la fonction SourceVersEcran, le champ SAI_EnCours_Autorisé aura: 
// - sa valeur affichée mise à jour par la propriété EnCoursAutorisé d'une instance de classe,
// - une couleur de fond affectée par la valeur d'une variable globale
gclContact is cContact
gsCouleur is int = PastelBlue
SAI_EnCours_Autorisé.LiaisonFichier = ":gclContact.EnCoursAutorisé" + TAB + ...
	"valeur" + CR + ":gsCouleur" + TAB + "CouleurFond"
// Mise à jour à l'écran
SourceToScreen()
Syntax

Identifying the binding between a control and an item or variable Hide the details

<Current binding> = <Control used>.DataBinding
<Current binding>: Character string
Different types of bindings can be found:
  • No link: empty string ("")
  • Simple binding to a data file item:
    "<Fichier de base>.<Rubrique de base>"
  • Complex binding to a data file item:
    "<Fichier de base>.<Rubrique de base>[ + TAB + <Liaison> [+ TAB + <Liaison>]]"

    where <Binding> corresponds to:
    <Related file>.<Key>:<Bound item>[<Index>]
  • Binding to a variable:
    ":<préfixe><Nom de la variable>"
    or
    ":<Nom de la variable>"
    (the prefix is applied only if the code style is enabled in the project).
<Control used>: Control name
Name of the control with the binding to be identified.

Modifying the binding between a control and an item or variable Hide the details

<Control used>.DataBinding = <New binding>
<Control used>: Control name
Name of the control with the binding to be modified.
<New binding>: Character string
Different types of bindings can be defined:
  • No link: empty string ("")
  • Simple binding to a data file item:
    "<Fichier de base>.<Rubrique de base>"
  • Complex binding to a data file item:
    "<Fichier de base>.<Rubrique de base>[ + TAB + <Liaison> [+ TAB + <Liaison>]]"

    where <Binding> corresponds to:
    <Related file>.<Key>:<Bound item>[<Index>]
    Note: the following syntax is also permitted:
    <[Fichier de base>.<Rubrique>[<[Indice]>] [: <Liaison> [: <Liaison>] ]

    where <Binding> = <Bound file>.<Key>:<DispItem> [<[Index]>]
  • Binding to a variable:
    ":<préfixe><Nom de la variable>"
    or
    ":<Nom de la variable>"
    The prefix must be specified only if the code style is enabled in the project (whether or not prefixes are displayed).
  • Binding to a variable of type data source:
    <Nom de la variable>.Nom + ".<Rubrique de base>"
  • Linking several properties with several variables: the string describing the link must be of the form:
    ":" + <Nom de la variable 1> + TAB + <Nom de la propriété 1> + RC + ...
    ":" + <Nom de la variable 2> + TAB + <Nom de la propriété 2> + RC + ...
    ":" + <Nom de la variable N> + TAB + <Nom de la propriété N>
Remarks
WINDEVJava

ListView control

The DataBinding property allows you to get and modify the binding between the captions in a ListView control and a data file item.
WINDEVJava

Display error

ControlError is used to customize the error message displayed in the controls when the control value cannot be displayed.

Limitations

The DataBinding property applies only to controls in a window or page.
Android Widget This property applies only to the following controls:
  • Button control.
  • Static Text control.
  • Image control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/27/2024

Send a report | Local help