Docs
API
  • fire(eventName: String, params: Mixed)

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

    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 addEvent
    Method on