ui.Dialog.appendRow()

The AppendRow() method is used to append a row to the end of the current list. The method, when executed, does not initiate any BEFORE ROW/AFTER ROW or BEFORE INSERT/AFTER INSERT actions or set a new row selection. The method performance is similar to appending a new row to the program array. The difference is that the internal registers are updated automatically. If multi-row selection is enabled in the current dialog, the selected rows will stay selected after the method execution. The new row appears unselected at the end of the list. The AppendRow() method does not move cursor to the new row, nor the focus is switched to the list.

 

The AppendRow() method must not be used in BEFORE ROW/AFTER ROW, BEFORE INSERT/AFTER INSERT, BEFORE DELETE/AFTER DELETE blocks.  However, you can use it in an ON ACTION block.

 

Note, that the AppendRow() method is used only to add a new row to the current screen array list and does not fill it with any values.

 

The method needs one argument:

 

DIALOG.AppendRow("screen_array")

 

The screen_array argument specifies the name of the screen array identifying the list to which the new row is to be appended.

 

The following snippet of the source code adds a number of new rows:

 

ON ACTION add_rows

LET num = fgl_winprompt (5, 5, "Enter the number of rows to be added", "1", 5, 2)

FOR i = 1 TO num

     CALL DIALOG.AppendRow("scr_arr")

END FOR