on

attaches a handler to an inner event of SpreadSheet

void on(string name,function handler, [any context] );

Parameters

namestringthe event's name, case-insensitive
handlerfunctionthe handler function
contextanythe value will be accessible as "this" inside of the event handler

Example

spreadsheet.events.on("StyleChange", function(id){
  console.log("The style of cell "+spreadsheet.selection.get()+" is changed");
});

Related samples

Details

See the list of SpreadSheet events.

You can attach several handlers to the same event and all of them will be executed. If some of handlers return false, the related operations will be blocked. Event handlers are processed in the same order that they are attached.

See also
Back to top