The Dialog class / ui.Dialog methods |
Appends a new row in the specified list.
The appendRow() method appends a row to the end of the array controlled by the dialog.
The method is similar to appending a new element to the program array, except the internal dialog registers are automatically updated (like the total number of rows returned by getArrayLength()). If the list is decorated with cell attributes, the program array defining the attributes will also be synchronized. If multi-row selection is enabled, selection flags of existing rows are kept. The new row is inserted at the end of the list with the selection flag set to zero.
After the method is called, a new row is created in the program array. You can assign values to the variables before the control goes back to the user. The getArrayLength() method will return the new row count.
The method does not set the current row and does not give the focus to the list; you need to call setCurrentRow() and execute NEXT FIELD to give the focus.
This method does not execute any BEFORE ROW, BEFORE INSERT, AFTER INSERT or AFTER ROW control blocks.
The appendRow() method does not create a temporary row as the implicit append action of INPUT ARRAY; The row is considered permanent once it is added.
ON ACTION append_some_rows FOR i = 1 TO 10 CALL DIALOG.appendRow("sa") LET r = DIALOG.getArrayLength("sa") LET p_items[r].item_quantity = 1.00 END FOR