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);
});

The names of events are case-insensitive.

Detaching event listeners

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

var onscroll = grid.events.on("Scroll", function({top,left}){
    console.log("The grid is scrolled to "+top,left);
});
 
grid.events.detach(onscroll);

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.

Back to top