Skip to content

onBeforeSelect

fires before a cell is selected

function onBeforeSelect(
// the selected object
selection: object,
// indicates whether the previous selection will be saved
preserve: boolean
): boolean

boolean returning false will prevent item selection

grid1.attachEvent("onBeforeSelect", function (selection, preserve){
// ... some code here ...
// return false to block operation
return true;
});

The selection object depends on the selection mode and includes the following attributes:

  • row - the id of the row with selection
  • column - the id of the column with selection
  • id - the id of the selected item (row, column, or cell, depending on the applied selection mode)

Articles

API