Try OpenEdge Now
skip to main content
GUI for .NET Programming
Binding ABL Data to .NET Controls : Understanding the ProBindingSource : Constructors : Field lists
Field lists
As optional parameters, the constructors can accept comma-separated lists of data object fields, in display order, to make available to or exclude from the UI. If you want to make only a few fields available, list them in the included field list. If you want to make most fields available, set the available fields to be all fields and list the remaining fields in the excluded field list. When the included field list is an asterisk (*), all fields in the data object are made available to any bound UI control.
The excluded field list is only meaningful when the included field list is an asterisk (*). If the included field list contains specific fields, the excluded field list is ignored. However, when you are not specifying any excluded fields, you still must specify a blank value ("") to match the constructor's signature.
Note: The ProBindingSource automatically excludes RAW fields; you do not have to explicitly exclude them. If you add them to the included field list, ABL raises a run-time error.
Some UI controls need to access and expose schema definition information from the data object, such as a grid needing column headers. The ProBindingSource makes the metadata available to the bound control. For the grid example, the ProBindingSource creates a field label that follows the same rules as column headers for an ABL Browse widget. The ProBindingSource uses, in order, the first of the following as the field label: the column label, the field label, or the field name.
When one of the fields is an array, the ProBindingSource treats each array element as a separate field. To generate unique names for each element, the ProBindingSource appends a suffix, [n], to the field name. Thus, if you wanted to include only the first three months of a monthly quota array, you could add the following field names to your include list:
... MonthQuota[1], MonthQuota[2], MonthQuota[3], ...
When a ProBindingSource includes fields from multiple tables, consider qualifying any ambiguous field names. Otherwise, the first field matching that name is used.
The following sections discuss the particular situations that might arise with each kind of data object.