Description: | A DataBindings collection object contains the DataBinding objects for Custom controls that can bind data. | ||
Details: | The DataBindings collection object is pointed at by the DataBindings property of the Custom control. The DataBindings property only exists in custom controls that support data binding (this is determined by the creators of the custom control). You refer to the DataBinding objects by using the Item property of the DataBindings collection object. For example, if you want to connect the ListText property of a custom control (called DataList1 which, of course, must support data binding) to the "Product" data field, code as follows: MOVE "Product" TO "DataField" OF "Item"("ListText") OF "DataBindings" OF DataList1 In this code, the part {OF "DataBindings" OF DataList1} defines the DataBindings collection object. And the part {"Item"("ListText") OF "DataBindings" OF DataList1} defines the DataBinding object. If you know the ordinal position of the DataBinding object within the DataBindings collection object, for example if the desired property corresponds to the third DataBinding object, you could code: MOVE "Product" TO "DataField" OF "Item"(3) OF "DataBindings" OF DataList1 The total number of DataBinding objects is contained in the Count property. For example, you can obtain the number of DataBinding objects by coding: MOVE "Count" OF "DataBindings" OF DataList1 TO ... | ||
Notes | The operation of the DataBindings collection object is different from that of other objects such as ListItem, Node, etc. The pointer to the DataBinding object must be obtained using the Item property. So, you CANNOT write: MOVE "Product" TO "DataField"
OF "DataBindings"("BoundText") << WRONG!!
OF DataList1 MOVE "Product" TO "DataField"
OF "DataBindings"(3) << WRONG!!
OF DataList1 | ||
Properties: | Count | Item | |
Methods: | None. | ||
Events: | None. | ||
Corresponding | None. |