Attaching the ProBindingSource control to a data source
- Last Updated: January 16, 2024
- 3 minute read
- OpenEdge
- Version 12.8
- Documentation
The ProBindingSource control, bindingSource1, is now the data source for the UltraGrid control. The UltraGrid control on the Design Canvas (see the following figure) displays bands of data with representative values, based on data type, in various fields. It also shows the label specified for each field.

When you expand the node, bands representing the child table appear, as shown in the following figure. The child table is esalesrep, which you specified when you created the ProBindingSource control, bindingSource1.

At run time, the UltraGrid is filled with Customer and SalesRep data supplied by the ProBindingSource. Before you can fill the UltraGrid control with actual data, however, you have to attach the ProBindingSource to an ABL data source. You can think of a ProBindingSource as a kind of intermediary between .NET controls and ABL data sources. It facilitates the transfer of data, and it takes care of the mapping of data types between .NET and ABL.
Up to this point, you only have half of the binding in place—the binding between ultraGrid1 and bindingSource1. To complete the binding you need to bind bindingSource1 to the ABL data source, which, in the Sample Application, is accessed through a service adapter.
The code for binding bindingSource1 to the data source is not
automatically generated. You must edit customerForm.cls to add the code
necessary to perform the binding. That code also includes open and close query methods and
updates to the CONSTRUCTOR and DESTRUCTOR.
In particular:
Do not add, edit, or delete
any VisualDesigner annotations. Annotations are lines that are preceded by
@ (for example,
@VisualDesigner.FormMember.).
Do not add, edit, or delete any code in the
InitializeComponent() method.
Do not delete or edit any code in the
CONSTRUCTOR or DESTRUCTOR. You can, however, add code to
these blocks.
To define the query: