Skip to main content
Skip table of contents

Functions for Event Handling

AddEvent procedure

Adds an event handler for a specific event. The event handler is the name of a macro.

Synopsis

CODE
AddEvent(event, handler, event_specific_parameters)

Parameters

Name

Required?

Type

Documentation

event

yes

string

The name of the event that should trigger the handler

handler

yes

string

The name of the script that should handle the event. The script must be stored in the Digas registry in the DBM\Macros key under this name.

event_specific_parameters

depends

string

Additional parameters; number and meaning depends on the event.

The event parameter can have one of the following values:

Event name

Triggered when

Additional Parameters

PreDrawGrid

when a grid is about to be updated

grids – comma-separated list of grids to which the handler should apply. If empty or not present, applies to all grids.

PreDrawGridField

when a field (cell) of a grid is about to be updated

grids – comma-separated list of grids to which the handler should apply. If empty or not present, applies to all grids.

columns – comma-separated list of grid column names or titles to which the handler should apply. If empty or not present, applies to all columns.

Returns

Nothing

Example

CODE
AddEvent("PreDrawGridField", "PreDrawGridField_Handler", "ENTRIES, GROUP_MEMBERS, SEARCH_RESULT", "special/custom_field")

ClearEvents procedure

Currently not available.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.