Need a special offer?Find out if your project fits.
+
All documentation
API reference
  • API Reference for older versions
  • on

    on(eventName: String, function: Function)

    [starting from version: 2.3]

    Sets a JS function for the specified event. Check out the list of events.

    You can also subscribe to the events during initialization by specifying them as new Flexmonster() parameters.

    Parameters

    Parameter/Type Description
    eventName
    String
    The name of the component's event.
    function
    Function
    The JS function which will be a handler for the specified component's event.

    Examples

    flexmonster.on('celldoubleclick', function () {
    alert('The cell is double clicked');
    });

    //If you plan on removing some certain event handler later,
    //add it the following way
    flexmonster.on('cellclick', onCellClick);

    function onCellClick(result) {
    alert('The cell is clicked');
    }

    Open the example on JSFiddle.

    See also

    off
    list of events