Previous Next

Progress.Data.BindingSource class

(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:
*
*
*
Note:
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.
Constructors
 
PUBLIC BindingSource ( INPUT query-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 buffer-hdl AS HANDLE 
                  [ , INPUT include-fields AS CHARACTER, 
                      INPUT except-fields AS CHARACTER ] )
 
PUBLIC BindingSource ( )
query-hdl
A HANDLE variable that represents the handle to a query object.
dataset-hdl
A HANDLE variable that represents the handle to a ProDataSet object.
buffer-hdl
A HANDLE variable that represents the handle to a buffer object.
parent-buffer-name
A CHARACTER variable that represents the name of a parent buffer in a ProDataSet object. This corresponds to the top-level table displayed in a hierarchical control (such as a grid or a treeview).
parent-buffer-hdl
A HANDLE variable that represents the handle to a parent buffer in a ProDataSet object. This corresponds to the top-level table displayed in a hierarchical control (such as a grid or a treeview).
include-fields
An optional CHARACTER expression that evaluates to a comma-separated list of fields in the ABL data source object to bind to the ProBindingSource. To include all fields, specify an asterisk (*) in include-fields. To include all but a few fields, specify an asterisk (*) in include-fields and a comma-separated list of fields to exclude in except-fields. If include-fields contains specific fields, except-fields is ignored.
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:
 
"table1.field1, table1.field2, table2.field1, table1.field3"
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.
except-fields
A CHARACTER expression that evaluates to a comma-separated list of fields in the ABL data source object to exclude from binding to the ProBindingSource. You can specify fields to exclude only when include-fields contains an asterisk (*). If you do not have any fields to exclude, you must specify the empty string (""). If include-fields contains specific fields, except-fields is ignored.
Binding to a query associated with a temp-table or database table
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.
*
*
*
Note:
*
Binding to a ProDataSet object
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.
*
*
Binding to a buffer object
When binding to a temp-table or database buffer, consider the following:
*
*
*
*
*
Binding to an unbound ProBindingSource instance
An unbound ProBindingSource instance is created by invoking the ProBindingSource constructor with no parameters. When binding to an unbound ProBindingSource instance, consider the following:
*
To limit which fields are exposed in the data source object, use the SetFields( ) method before binding to the data source object.
*
*
When you set the ProBindingSource’s Handle property, the AVM includes, by default, all fields from the ABL data source object’s schema in the .NET control. (This is equivalent to specifying an asterisk (*) in the include-fields parameter when invoking a ProBindingSource constructor with parameters.) If you want to limit the available fields, you must use the ProBindingSource’s SetFields( ) method before you specify the Handle property. Attempting to use the SetFields( ) method after specifying the Handle property causes the ProBindingSource to throw a .NET exception.
Super Class
System.Windows.Forms.BindingSource class (from the .NET Framework)
Interfaces
This class does not implement interfaces (beyond those it inherits from its base class).
Public
Properties
 
Public
Methods
 
Public
Events
 
Notes 
*
*
For information on the public class members inherited from the System.Windows.Forms.BindingSource class, refer to the .NET Framework class library.

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.