Write Grid Line-Before

The engine then fires the Write Grid Line-Before event. A this point, the runtime structures have these values:

  • BC = Values from the database (from the record just read).

  • FC = Values from the database (if the fields are database fields).

  • GC = Values from the database (from the previous read).

  • FI = Values passed from a calling form (if any).

  • PO = Values passed from POs.

This diagram illustrates the information in the runtime structures just before the system fires Write Grid Line-Before:

Content of runtime structures before Write Grid Line–Before fires

The Write Grid Line–Before event is commonly used to perform these tasks:

  • Suppress a grid row from being written.

  • Add logic before the user sees a row on the form.

  • Change formatting of a grid column.

  • Convert any grid value, such as unit of measure.

  • Retrieve additional information for the grid row, such as a description, from tables that are not in the BV.

After the system processes Write Grid Line–Before, the GC elements, which now include the database values for the first record, are copied to the grid cells on the form.

This diagram illustrates the information that appears in the runtime structures now:

Content of runtime structures after Write Grid Line–Before fires