Events
Events are objects sent to the /runevent endpoint whenever something happens on the frontend — a button click, a field change, a table load, and so on. When an event arrives, /runevent uses the event type and widget name to locate the matching handler method on your class, calls it, and returns the response back to the form.
Event constants
When your runEvent handler receives a request, the event type arrives in the widgetEvent field as an uppercase string. The constants below map readable names to those values.
Form Events
| Constant | Value | Description |
|---|---|---|
OnInit | ONINIT | Triggered when the form loads |
OnSave | ONSAVE | Triggered when a form save is requested |
OnCancel | ONCANCEL | Triggered when the user cancels the form |
OnRefresh | ONREFRESH | Triggered when the form needs to refresh |
OnPrint | ONPRINT | Triggered when the user initiates a print |
OnPrintReturnContents | ONPRINTRETURNCONTENTS | Return printable content from backend |
Widget Events
| Constant | Value | Description |
|---|---|---|
OnClick | ONCLICK | Triggered when a button is clicked |
OnChange | ONCHANGE | Triggered when a field value changes |
OnDelete | ONDELETE | Triggered when a delete is requested |
OnDownload | ONDOWNLOAD | Triggered when a download is requested |
Datatable — Data Loading
| Constant | Value | Description |
|---|---|---|
OnTableLoadData | ONTABLELOADDATA | Triggered when a table needs its row data |
OnTableEditLoadData | ONTABLEEDITLOADDATA | Triggered when an editable table needs its row data |
Datatable — Row Actions
| Constant | Value | Description |
|---|---|---|
OnTableRunActionEvent | ONTABLERUNACTIONEVENT | Triggered by a row action button (edit, delete, etc.) |
OnTableEditRunActionEvent | ONTABLEEDITRUNACTIONEVENT | Triggered by a row action in inline editing mode |
OnTableSelectRowEvent | ONTABLESELECTROWEVENT | Triggered when a row is selected |
OnRowCheckbox | ONROWCHECKBOX | Triggered when a row checkbox is clicked |
Datatable — Batch & Record Creation
| Constant | Value | Description |
|---|---|---|
OnTableRunBatchActionEvent | ONTABLERUNBATCHACTIONEVENT | Triggered when operating on multiple rows |
OnTableCreateRecordEvent | ONTABLECREATERECORDEVENT | Triggered when "Add New" is clicked in a table |
OnLoadNewRecordTemplates | ONLOADNEWRECORDTEMPLATES | Provide template options for new records |
File Upload Events
| Constant | Value | Description |
|---|---|---|
OnFileUpload | ONFILEUPLOAD | Triggered when files are uploaded |
OnFileUploadCreateDocumentEvent | ONFILEUPLOADCREATEDOCUMENT | Triggered by datatable file uploads |
Signature / Workflow Events
| Constant | Value | Description |
|---|---|---|
OnStartSignProcess | ONSTARTSIGNPROCESS | Triggered when a signature process starts |
OnFinishSignProcess | ONFINISHSIGNPROCESS | Triggered when a signature process completes |
Advanced Events
| Constant | Value | Description |
|---|---|---|
OnDirectRunFormEvent | ONDIRECTRUNFORMEVENT | Custom direct event handling |
OnGetCustomResponse | ONGETCUSTOMRESPONSE | Return a custom response structure |
EventHandlerEvents constants class
Copy this class into your project to avoid hardcoding event strings:
EventHandlerEvents.cs
public class EventHandlerEvents
{
// Form Events
public const string OnCancel = "ONCANCEL";
public const string OnDelete = "ONDELETE";
public const string OnDownload = "ONDOWNLOAD";
public const string OnChange = "ONCHANGE";
public const string OnClick = "ONCLICK";
public const string OnInit = "ONINIT";
public const string OnRefresh = "ONREFRESH";
public const string OnSave = "ONSAVE";
// Datatable Events
public const string OnTableRunActionEvent = "ONTABLERUNACTIONEVENT";
public const string OnTableRunBatchActionEvent = "ONTABLERUNBATCHACTIONEVENT";
public const string OnTableEditRunActionEvent = "ONTABLEEDITRUNACTIONEVENT";
public const string OnTableLoadData = "ONTABLELOADDATA";
public const string OnTableEditLoadData = "ONTABLEEDITLOADDATA";
public const string OnTableCreateRecordEvent = "ONTABLECREATERECORDEVENT";
public const string OnTableSelectRowEvent = "ONTABLESELECTROWEVENT";
// File Upload Events
public const string OnFileUpload = "ONFILEUPLOAD";
public const string OnFileUploadCreateDocumentEvent = "ONFILEUPLOADCREATEDOCUMENT";
// Print Events
public const string OnPrint = "ONPRINT";
public const string OnPrintReturnContents = "ONPRINTRETURNCONTENTS";
// Checkbox Events
public const string OnRowCheckbox = "ONROWCHECKBOX";
// Signature Events
public const string OnStartSignProcess = "ONSTARTSIGNPROCESS";
public const string OnFinishSignProcess = "ONFINISHSIGNPROCESS";
// Template Events
public const string OnLoadNewRecordTemplates = "ONLOADNEWRECORDTEMPLATES";
// Advanced Events
public const string OnDirectRunFormEvent = "ONDIRECTRUNFORMEVENT";
public const string OnGetCustomResponse = "ONGETCUSTOMRESPONSE";
}