Skip to main content

afterBlockSelectionMove

pro version only

This functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) package.

triggered after moving the selection boundary

Usage

afterBlockSelectionMove: (
startCell: { row: object; column: object },
endCell: { row: object; column: object },
focusCell: { row: object; column: object } | null,
dragDirection: "up" | "down" | "left" | "right" | null,
event: MouseEvent | TouchEvent
) => void;

Parameters:

The callback of the event is called with the following parameters:

startCell(object) an object that contains the initial cell of the selection, includes the following properties:
  • row - (object) the row configuration object
  • column - (object) the column configuration object
endCell(object) an object that contains the current end cell of the selection, includes the following properties:
  • row - (object) the row configuration object
  • column - (object) the column configuration object
focusCell(object) an object that contains the focus cell (if the handle is used) or null, includes the following properties:
  • row - (object) the row configuration object
  • column - (object) the column configuration object
dragDirection(string) determines the direction of movement of the focused cell: "up" | "down" | "left" | "right" | null
event(Event) the browser event: MouseEvent or TouchEvent

Example

grid.block.events.on("afterBlockSelectionMove", (startCell, endCell) => {
console.log("Selection updated to:", endCell.column.id, endCell.row.id);
});

Change log:

added in v9.2