Skip to main content

Event handling

Attaching event listeners

You can attach event listeners with the grid.events.on() method:

grid.events.on("scroll", function({top,left}){
console.log("The grid is scrolled to "+top,left);
});
note

The names of events are case-insensitive.

Related sample: Grid. Events

Detaching event listeners

To detach events, use grid.events.detach():

grid.events.on("scroll", function({top,left}){
console.log("The grid is scrolled to "+top,left);
});

grid.events.detach("scroll");

Calling events

To call events, use grid.events.fire():

grid.events.fire("name",args);
// where args is an array of arguments

The list of events

The full list of events is available in the related API section.