Dynamic Combo Box control type

The K2BTools Dynamic Combo Box extends the UI and functionality of the standard GeneXus dynamic combo boxes, while keeping the definition as simple as the latter.

Extended combo box
K2BTools Dynamic Combo Box

Moving from standard GeneXus dynamic combo boxes is as simple as changing the control type to “Dynamic Combobox K2BTools”. No other property changes are required. With this change only, the application user will experience a slight change in UI.

To fully use the power of the extended comboboxes the developer can use the following options.

Add information to the item definition

In addition to the “Item Value” and “Item Description” properties, the developer can optionally set any combination of the following properties. The combo item design is adjusted according to the available information.

  • Item Image
  • Item Detail
  • Item Trailing Text
  • Item Category
See how each property is used in the image below:

ExtendedComboboxPropertiesMapping
Properties mapping

See how the combo is shown for each combination of these properties below.

ComboOptionsWithCategories
Variants with categories

ComboOptionsWithoutCategories
Variants without categories

Add search to filter control options

When the combobox contains a large number of options available the developer may turn on search, by setting the Include search property. If so, a search field is included in the control and only items matching the search are shown in the list.

Search is performed on all text values of each entry (value, description, etc).

ExtendedComboboxSearch
Search inside the combobox

Create new items

If, at run-time, a required item does not exist, the application user may create it without leaving the context. For example, if an application user is entering a sales order and the customer does not yet exist, the user may like to create it and continue entering the order without losing the information already entered.

The “Enable add item” property controls whether or not this functionality is available to the application user. When turned on, a Web Component must be specified in the “New Item Component” property. The component may be a transaction. If the transaction has the Entity Services pattern applied, integration is automatic.

If the component is not a transaction, the developer must specify its parameters in the “New Item Parameters” property, and the component must follow some rules.

Technical notes

  • The user control always loads data from a variable of the K2BT_ExtendedControlValues structure data type.

If Data source=Attributes the variable is automatically created and loaded by K2B Tools.

If Data source=Dataprovider and the data provider's return type is K2BT_ExtendedControlValues, then no further conversion is done. If the Dataprovider returns any other structure, the extended properties are used to map the returned data type members to the K2BT_ExtendedControlValues ones.

  • Data source from values

Transactions allow the Dataprovider value only.

The reason for this is that a for each/endfor is required to implement the Attributes value and for eachs are not allowed in transactions.

Availability

The Extended combo box is available as of K2BTools 13.1