This section is dedicated to bring all properties, events and methods to handle the selection on the javascript grid.



Methods available to deal with the javascript grid selection
getHighlightedGet the coordinates of the highlighted cells.
getHighlighted() : Array | null

getRangeGet the range description of the highlighted cells.
getRange() : String | null

selectAllSelect all cells.
selectAll() : void

updateSelectionSelect the cells from the coordinates of a DOM element.
updateSelection(e1: DOMElement, e2: DOMElement) : void

updateSelectionFromCoordsSelect the cells by coordinates.
updateSelectionFromCoords(x1: Number, y1: Number, x2: Number, y2: Number) : void

resetSelectionRemote the selection.
resetSelection() : void

isSelectedVerify if a coordinates given is included in the current selection.
isSelected(x: Number, y: Number) : Boolean


onbluronblur(worksheet: Object) : void
onfocusonfocus(worksheet: Object) : void
onselectiononselection(worksheet: Object, x1: Number, y1: Number, x2: Number, y2: Number, e: MouseEvent) : void

Initial Settings

selectionCopy: booleanDisable the clone selection.


Select all worksheet cell grid programatically

<script src=""></script>
<script src=""></script>
<link rel="stylesheet" href="" type="text/css" />
<link rel="stylesheet" href="" type="text/css" />

<div id="spreadsheet"></div>

<button onclick="table[0].selectAll()">Select all</button>
<button onclick="table[0].updateSelectionFromCoords(2,2,3,3)">updateSelectionFromCoords(2,2,3,3)</button>

var table = jspreadsheet(document.getElementById('spreadsheet'), {
    worksheet: [{
        minDimensions: [6,6],