Events
There are 3 ways of setting handlers on events with several combinations.
Over function
Samples
var grid = new FancyGrid({
...
});
grid.on('cellclick', function(grid, o){
});
Over params
Samples
var grid = new FancyGrid({
...
events: [{
cellclick: function(grid, o){
},
scope: {},// Scope of execution. Not required
delay: 100// Delay in milliseconds. Not required
},{
celldblclick: function(grid, o){
}
}]
...
});
Samples: handler inside
var grid = new FancyGrid({
...
events: [{
cellclick: 'onCellClick'
},{
celldblclick: 'onCellDBLClick'
}],
onCellClick: function(grid, o){
},
onCellDBLClick: function(grid, o){
}
...
});
Over controllers
Read section about Controllers