DHTMLX Docs & Samples Explorer

Events

List of supported events

  • Loading Events:
    • onXLS - occurs before sending data request to server
    • onXLE - occurs after sending data request to server

Attaching/removing event handler

dhtmlXDataStore allows to handle different events using its event handling system. You can attach several handlers to the same event and detach them using two respective methods:

  • attachEvent() - to attach event.

    function my_handler(){ do_something(); };
    data.attachEvent("onSomeEvent",my_handler);
    • evName - the name of an event;
    • evHandler - the user-defined event handler.
  • detachEvent() - to detach event.

    var myevent = data.attachEvent("onSomeEvent",my_handler);
      ...
    data.detachEvent(myevent); // the unique id of the event handler

Useful tips

  • Events' names are case-insensitive.
  • All events with subword 'onbefore' can be blocked. To block default event processing you should return false within the appropriate event handler.