Configuration options

Various options can be specified to control the behavior of the DISPLAY ARRAY instruction.

Additional options are available to configure a DISPLAY ARRAY dialog. For more details, go to the List dialogs chapter in the Genero Business Development Language User Guide.

The UNBUFFERED attribute

By default, in order to update the data displayed during a dialog, the program code must set the value in the variable and then display this value to the form field with a DISPLAY variable-name TO screen-array[screen-line].field-name. By using the UNBUFFERED attribute, the DISPLAY ARRAY dialog synchronizes automatically the form fields with the program variables:

DISPLAY ARRAY custarr TO sa_cust.* ATTRIBUTES(UNBUFFERED)
As result, during a DISPLAY ARRAY, your program code only needs to change the values in the program array.

Number of rows in the record list

When using a DYNAMIC ARRAY, the total number of rows is implicitly defined by the number of rows in the program array. When using a static array, the total number of rows must be defined with the COUNT attribute.

Defining a specific row selection action

To select a row in the list, the user must double-click on the row with the mouse or hit the Enter key. The default action triggered by a row selection is the accept action. If you need to define a different action, use the DOUBLECLICK attribute:
DISPLAY ARRAY custarr TO sa_cust.* ATTRIBUTES(DOUBLECLICK=rowsel)

Controlling the row selection mode

By default, only one row can be highlighted during a DISPLAY ARRAY dialog. Multiple-row selection can be activated with the DIALOG.setSelectionMode() method. This method is typically used in the BEFORE DIALOG block of the DISPLAY ARRAY:
DISPLAY ARRAY custarr TO sa_cust.*
   BEFORE DISPLAY
      CALL DIALOG.setSelectionMode("sa_cust",1)

Decorating record list cells

Each cell of table rows can be decorated with a specific color and effect, by defining a program array dedicated to decoration attributes, that is bound to the DISPLAY ARRAY dialog with the DIALOG.setArrayAttributes() method:
DISPLAY ARRAY custarr TO sa_cust.*
   BEFORE DISPLAY
      CALL DIALOG.setArrayAttributes("sa_cust",custatt)
When changing the decoration attributes of the custatt array, the cells will automatically get the colors and effects defined in the array.