(Windows only; GUI for .NET only)
A BindingSource object (the ProBindingSource) that allows you to bind a .NET control on a form to one of the following ABL data source objects:
The Progress.Data.BindingSource class is an OpenEdge .NET class that extends the .NET System.Windows.Forms.BindingSource class. The ProBindingSource acts as a conduit between a .NET control and an ABL data source object. A bound .NET control considers the ProBindingSource to be its data source. In turn, the ProBindingSource sets the underlaying ABL data source object as its data source. For a complete overview of data binding between .NET controls and ABL data source objects, see OpenEdge Development: GUI for .NET Programming.
PUBLIC BindingSource ( INPUT query-hdl AS HANDLE ) PUBLIC BindingSource ( INPUT query-hdl AS HANDLE, INPUT include-fields AS CHARACTER, INPUT except-fields AS CHARACTER ) PUBLIC BindingSource ( INPUT dataset-hdl AS HANDLE ) PUBLIC BindingSource ( INPUT dataset-hdl AS HANDLE, { INPUT parent-buffer-name AS CHARACTER | INPUT parent-buffer-hdl AS HANDLE } ) PUBLIC BindingSource ( INPUT dataset-hdl AS HANDLE, INPUT include-fields AS CHARACTER, INPUT except-fields AS CHARACTER ) PUBLIC BindingSource ( INPUT dataset-hdl AS HANDLE, { INPUT parent-buffer-name AS CHARACTER | INPUT parent-buffer-hdl AS HANDLE }, INPUT include-fields AS CHARACTER, INPUT except-fields AS CHARACTER ) PUBLIC BindingSource ( INPUT dataset-hdl AS HANDLE, INPUT report-mode AS LOGICAL ) PUBLIC BindingSource ( INPUT dataset-hdl AS HANDLE, { INPUT parent-buffer-name AS CHARACTER | INPUT parent-buffer-hdl AS HANDLE }, INPUT include-fields AS CHARACTER, INPUT except-fields AS CHARACTER, INPUT report-mode AS LOGICAL ) PUBLIC BindingSource ( INPUT buffer-hdl AS HANDLE ) PUBLIC BindingSource ( INPUT buffer-hdl AS HANDLE, INPUT include-fields AS CHARACTER, INPUT except-fields AS CHARACTER ) PUBLIC BindingSource ( ) |
When including fields for a ProDataSet object, you must specify a comma-separated list of fields to display in display order and qualify the field names with their buffer name. For example:
You must specify at least one field from each table in the hierarchy to be displayed.
When including fields for a query or a join query, you must specify a comma-separated list of fields to display in display order and you should qualify ambiguous field names with their buffer name.
Do not specify a RAW temp-table or a database field in include-fields. If you explicitly specify a RAW field, the AVM generates a run-time error. If you specify an asterisk (*) to include all fields and there is a RAW field in the table, the AVM excludes it automatically even if it is not specified in except-fields.
When binding to a temp-table or database table through a query, consider the following:
If the query is a join with duplicate field names in the tables, you should qualify the field names with the buffer names using the buffer-name.field-name syntax. Also, the ProBindingSource treats elements in an array field as separate fields and makes them unique by appending their array subscript using the array-name[subscript] syntax.
Binding to a ProDataSet object enables you to create a hierarchical display of a parent buffer and its child buffers in the same .NET control (such as a grid or a treeview). When binding to a ProDataSet object, consider the following:
For more information on how the ProBindingSource manages currency between parent and child buffers, including a code example, see the data-binding chapter in OpenEdge Development: GUI for .NET Programming.
When binding to a temp-table or database buffer, consider the following:
An unbound ProBindingSource instance is created by invoking the ProBindingSource constructor with no parameters. When binding to an unbound ProBindingSource instance, consider the following: