Docs
API
  • addEvent(eventName: String)


    For adding custom event it is used 3 methods: addEvent, fire, on.
    Method addEvent adds custom event to grid.

    Example

    
    events: [{
      init: function(grid) {
        grid.addEvent('custom-event');
    
        grid.on('custom-event', function() {
          console.log(arguments);
        });
    
    	setTimeout(() => {
    	  grid.fire('custom-event', {
    		text: 'Good morning'
    	  });
    	}, 3000);
      }
    }],
    tbar: [{
      type: 'button',
      text: 'Click',
      handler: function() {
    	grid.fire('custom-event', {
    	  text: 'Good evening'
    	});
      }
    }],
    

    Samples

    Custom Event

    See also

    Method fire
    Method on