How You Can Insert New Rows Before Existing Rows
The user can insert rows before existing rows by using the Insert Before Current Row menu item of the table field's control button.
Enabling or disabling Inserts can be done by enabling or disabling this menu item from OpenROAD. You can use the Option Menu Editor to determine the name of an item in the control button menu. To open the Option Menu Editor from the Frame Editor, select the control button and then click Edit, OptionMenu. For example, if the table field's control button is named tblfld_controlbutton, the following code can be used to disable the menu:
field(tblfld_controlbutton.insertbefore).CurBias = MB_DISABLED;
The following table shows the menu text and menu button names for the table field control button:
To enable the menu, use bias MB_ENABLED instead of MB_DISABLED. To remove this item from the menu, use bias MB_INVISIBLE.
By default, the insertbefore menu item is enabled only in FM_UPDATE and FM_QUERY modes, and disabled in FM_READ, FM_USER1, FM_USER2, and FM_USER3 modes.