Skip to main content

fire()

Description

Triggers an inner event

info

Normally, events are called automatically and you don't need to use this method.

Usage

fire(name: string, arguments: array): boolean;

Parameters

  • name - (required) the event's name, case-insensitive
  • arguments - (required) an array of the event-related data

Returns

The method returns false, if some of the event handlers return false. Otherwise, true

Example

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
// config parameters
});
spreadsheet.parse(data);

spreadsheet.events.on("CustomEvent", function(param1, param2){
return true;
});

const res = spreadsheet.events.fire("CustomEvent", [12, "abc"]);

Related articles: Event Handling