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

$$("grid1").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 datatable (cell, row, column modes)
  • "bottom" - the selection is moved to the last item of the datatable (cell, row, column modes)
  • "up" - the selection is moved one row up (cell and row selection modes)
  • "down" - the selection is moved one row down (cell and row selection modes)
  • "right" - the selection is moved one column right (cell and column selection modes)
  • "left" - the selection is moved one column left (cell and column selection modes)
  • "pgup" - the selection is moved to the first item of the previous page (cell, row, column modes, if a pager is used in the datatable)
  • "pgdown" - the selection is moved to the first item of the next page ((cell, row, column modes, if a pager is used in the datatable)

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