|
|
|
|
|
- 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 gets and changes the binding between a control and: - a data file item.
- a variable.
- several variables (in this case, each variable can be bound to a different property of the control).
A control can be bound to an item from a base data file, or to an item from a linked data file. This is referred to as complex binding. Example of complex binding:
This property is equivalent to the ControlAlias function.
EDT_Edit1.DataBinding = "Customer.Name"
EDT_Edit2.DataBinding = "Order.CustomerID" + TAB + "Customer.CustomerID:Name"
EDT_Edit3.DataBinding = "OrdLine.OrdID" + TAB + ...
"Order.OrdID:CustomerID" + TAB + "Customer.CustomerID:Name"
TABLE_Table1.DataBinding = ":Array_Month"
FileToScreen()
gclContact is cContact
gsColor is int = PastelBlue
EDT_Current_Allowed.DataBinding = ":gclContact.Authorizing" + TAB + ...
"value" + CR + ":gsColor" + TAB + "BackgroundColor"
SourceToScreen()
Syntax
Getting the binding between a control and an item or variable Hide the details
<Current binding> = <Control used>.DataBinding
<Current binding>: Character string There are different types of bindings:- No binding: empty string ("")
- Simple binding to a data file item:
"<Base data file>.<Base item>" - Complex binding to a data file item:
"<Base data file>.<Base item>[ + TAB + <Binding> [+ TAB + <Binding>]]" where <Binding> corresponds to: <Bound data 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.
Changing 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 for which you want to change the data binding. <New binding>: Character string There are different types of bindings:- No binding: empty string ("")
- Simple binding to a data file item:
"<Base data file>.<Base item>" - Complex binding to a data file item:
"<Base data file>.<Base item>[ + TAB + <Binding> [+ TAB + <Binding>]]" where <Binding> corresponds to: <Bound data file>.<Key>:<Bound item>[<Index>] Note: You can also use the following syntax:
<[Base data file>.<Item>[<[Index]>] [: <Binding> [: <Binding>] ] where <Binding> = <Bound data file>.<Key>:<Displayed item> [<[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>" - Binding multiple properties to multiple variables. The string that describes the binding must have the following format:
":" + <Variable name 1> + TAB + <Name of property 1> + CR + ... ":" + <Variable name 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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|