|
|
|
|
|
- ListView control
- Display error
- Limitations
DataBinding (Property) In french: LiaisonFichier
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 an item in a data file.
- and a variable.
- and several variables (in this case, each variable can be bound to a different property of the control).
Example of multi-file binding:
This property is equivalent to the ControlAlias function.
// Binds the EDT_Edit1 control to the Name item of the Customer data file EDT_Edit1.DataBinding = "Customer.Name" // Same but from the Order data file with 1 binding EDT_Edit2.DataBinding = "Order.CustomerID" + TAB + "Customer.CustomerID:Name" // Same but from the OrdLine data file with 2 bindings EDT_Edit3.DataBinding = "OrdLine.OrdID" + TAB + ... "Order.OrdID:CustomerID" + TAB + "Customer.CustomerID:Name" // Binds TABLE_Table1 to Array_Month TABLE_Table1.DataBinding = ":Array_Month" // Update on the screen FileToScreen()
// Whenever SourceToScreen is called, the EDT_Current_Allowed control will have: // - its displayed value updated by the Authorizing property of a class instance, // - a background color assigned by the value of a global variable gclContact is cContact gsColor is int = PastelBlue EDT_Current_Allowed.DataBinding = ":gclContact.Authorizing" + TAB + ... "value" + CR + ":gsColor" + TAB + "BackgroundColor" // Update on the screen 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 binding: empty string ("")
- Simple binding to an item of a data file:
"<Base file>.<Base item>" - Complex binding to an item of a data file:
"<Base file>.<Base item>[ + TAB + <Binding> [+ TAB + <Binding>]]" where <Binding> corresponds to: <Related file>.<Key>:<Bound item>[<Index>] - Binding to a variable:
":<prefix><Variable name>" or (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 binding: empty string ("")
- Simple binding to an item of a data file:
"<Base file>.<Base item>" - Complex binding to an item of a data file:
"<Base file>.<Base item>[ + TAB + <Binding> [+ TAB + <Binding>]]" where <Binding> corresponds to: <Related file>.<Key>:<Bound item>[<Index>] Remark: the following syntax is also accepted:
<[Base file>.<Item>[<[Index]>] [: <Binding> [: <Binding>] ] where <Binding> = <Bound file>.<Key>:<DispItem> [<[Index]>] - Binding to a variable:
":<prefix><Variable name>" or 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:
<Variable name>.Name + ".<Base item>" - Bind multiple properties to multiple variables: the character string that describes the binding must have the following format:
":" + <Name of variable 1> + TAB + <Name of property 1> + CR + ... ":" + <Name of variable 2> + TAB + <Name of property 2> + CR + ... ":" + <Name of variable N> + TAB + <Name of property N>
Remarks Limitations The DataBinding property applies only to controls in a window or page.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|