Bind ProBindingSource to buffers
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Syntax
You can bind the ProBindingSource to a buffer using the following syntax:
|
Where buffer-hdl is the buffer handle, include-fields is an optional, comma-separated list of fields from the data object to make available to the UI, and except-fields is a comma-separated list of fields from the data object to exclude from the UI. Note that you must supply the included and excluded field lists together whenever you use them.
You cannot simultaneously bind the same buffer to multiple ProBindingSources. A buffer can only be bound to a single ProBindingSource at any time. If you try to bind a buffer that is already bound to another ProBindingSource, the ProBindingSource throws an error.
Typically, you use a buffer
when the ProBindingSource supplies data for single-value UI controls,
like text boxes or toggles. In such cases, there is only one record
in the buffer. Because the ProBindingSource's Position property
works off a 0-based index, this record always yields a Position value
of zero. As a result, you manage currency by changing the row in
the data object programmatically.
In the typical case, you have multiple UI controls that each bind to a different field in the buffer. So, any other available fields do not matter much. If you have a buffer with a large number of fields that the UI does not need, you should consider using the optional field list parameters to improve performance.