Skip to content

onBeforeAreaAdd

fires before a select area is added

function onBeforeAreaAdd(
// the area object
area: object
): void
grid.attachEvent("onBeforeAreaAdd", function(area){
// some code here
return true;
});

The event can be blocked. Return false to block area adding.

The properties of the area object are:

  • start - (object) the id object of the left top cell, contains two parameters: the row id and the column id
  • end - (object) the id object of the right cell, contains two parameters: the row id and the column id
  • preserve - (boolean) defines if the previous select area should be saved, false by default
  • area_name - (string) optional, the name of an area
  • css - (string) optional, the css style for an area
  • handle - (boolean) optional, defines whether selection will be resized with or without a handle