onMoveSelection

fires when selection is moved in some direction

void onMoveSelection(object cell,string direction,object details);
cellobjectan object with the row/column ids
directionstringthe move direction
detailsobjectan object with details of selection moving

Example

$$("excelviewer1").attachEvent("onMoveSelection", function(cell, direction, details){
    // your code here
});

Details

The possible direction values are:

  • "top" - the selection is moved to the first item of the excelviewer
  • "bottom" - the selection is moved to the last item of the excelviewer
  • "up" ("left") - the selection is moved one item left
  • "down" ("right") - the selection is moved one item right
  • "pgup" - the selection is moved to the first item of the previous page (a page is the currently visible excelviewer)
  • "pgdown" - the selection is moved to the first item of the next page (a page is the currently visible excelviewer)

The details object includes the following properties:

  • ctrl - (boolean) true/false, to define whether the Ctrl key was used for selection
  • shift - (boolean) true/false, to define whether the Shift key was used for selection
  • step - (number) the step of selection moving
  • e - (KeyboardEvent) the native keyboard event
See also
Back to top