GridElementEvents

Configs

3

Set to true to listen for CTRL-Z (CMD-Z on Mac OS) keyboard event and trigger undo (redo when SHIFT is pressed). Only applicable when using a StateTrackingManager.

hoverCls: String= b-hover

A CSS class to add to hovered row elements

Time in ms until a longpress is triggered

Properties

5

Class hierarchy

isGridElementEvents: Boolean= truereadonly
Identifies an object as an instance of GridElementEvents class, or subclass thereof.
isGridElementEvents: Boolean= truereadonlystatic
Identifies an object as an instance of GridElementEvents class, or subclass thereof.

Misc

Set to true to listen for CTRL-Z (CMD-Z on Mac OS) keyboard event and trigger undo (redo when SHIFT is pressed). Only applicable when using a StateTrackingManager.

hoveredCell: HTMLElementreadonly

The currently hovered grid cell

Time in ms until a longpress is triggered

Events

12

Fired when user clicks in a grid cell

// Adding a listener using the "on" method
gridElementEvents.on('cellClick', ({ grid, record, column, cellElement, target, event }) => {

});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Fired when user activates contextmenu in a grid cell

// Adding a listener using the "on" method
gridElementEvents.on('cellContextMenu', ({ grid, record, column, cellElement, target, event }) => {

});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Fired when user double clicks a grid cell

// Adding a listener using the "on" method
gridElementEvents.on('cellDblClick', ({ grid, record, column, cellElement, target, event }) => {

});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Fired when the mouse enters a cell

// Adding a listener using the "on" method
gridElementEvents.on('cellMouseEnter', ({ source, record, column, cellElement, event }) => {

});
ParameterTypeDescription
sourceGrid

The grid instance

recordModel

The record representing the hovered cell

columnColumn

The column currently hovered

cellElementHTMLElement

The cell HTML element

eventMouseEvent

The native DOM event

Fired when the mouse leaves a cell

// Adding a listener using the "on" method
gridElementEvents.on('cellMouseLeave', ({ source, record, column, cellElement, event }) => {

});
ParameterTypeDescription
sourceGrid

The grid instance

recordModel

The record representing the cell that the mouse left

columnColumn

The column representing the cell that the mouse left

cellElementHTMLElement

The cell HTML element that the mouse left

eventMouseEvent

The native DOM event

Fired when a user moves the mouse out of a grid cell

// Adding a listener using the "on" method
gridElementEvents.on('cellMouseOut', ({ grid, record, column, cellElement, target, event }) => {

});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Fired when user moves the mouse over a grid cell

// Adding a listener using the "on" method
gridElementEvents.on('cellMouseOver', ({ grid, record, column, cellElement, target, event }) => {

});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Fired when a grid header is clicked on.

Returning false from a handler prevents any features (such as Sort) from recieving and processing the click event.

// Adding a listener using the "on" method
gridElementEvents.on('headerClick', ({ domEvent, column }) => {

});
ParameterTypeDescription
domEventEvent

The triggering DOM event.

columnColumn

The column clicked on.

Mouse moved out from element in grid

// Adding a listener using the "on" method
gridElementEvents.on('mouseOut', ({ event }) => {

});
ParameterTypeDescription
eventMouseEvent

The native browser event

Mouse moved in over element in grid

// Adding a listener using the "on" method
gridElementEvents.on('mouseOver', ({ event }) => {

});
ParameterTypeDescription
eventMouseEvent

The native browser event

Fired when the mouse enters a row

// Adding a listener using the "on" method
gridElementEvents.on('rowMouseEnter', ({ source, record, column, cellElement, event }) => {

});
ParameterTypeDescription
sourceGrid

The grid instance

recordModel

The record representing the hovered row

columnColumn

The column currently hovered

cellElementHTMLElement

The cell HTML element

eventMouseEvent

The native DOM event

Fired when the mouse leaves a row

// Adding a listener using the "on" method
gridElementEvents.on('rowMouseLeave', ({ source, record, cellElement, event }) => {

});
ParameterTypeDescription
sourceGrid

The grid instance

recordModel

The record representing the row that the mouse left

cellElementHTMLElement

The cell HTML element that the mouse left

eventMouseEvent

The native DOM event

Event handlers

12

Called when user clicks in a grid cell

new GridElementEvents({
    onCellClick({ grid, record, column, cellElement, target, event }) {

    }
});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Called when user activates contextmenu in a grid cell

new GridElementEvents({
    onCellContextMenu({ grid, record, column, cellElement, target, event }) {

    }
});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Called when user double clicks a grid cell

new GridElementEvents({
    onCellDblClick({ grid, record, column, cellElement, target, event }) {

    }
});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Called when the mouse enters a cell

new GridElementEvents({
    onCellMouseEnter({ source, record, column, cellElement, event }) {

    }
});
ParameterTypeDescription
sourceGrid

The grid instance

recordModel

The record representing the hovered cell

columnColumn

The column currently hovered

cellElementHTMLElement

The cell HTML element

eventMouseEvent

The native DOM event

Called when the mouse leaves a cell

new GridElementEvents({
    onCellMouseLeave({ source, record, column, cellElement, event }) {

    }
});
ParameterTypeDescription
sourceGrid

The grid instance

recordModel

The record representing the cell that the mouse left

columnColumn

The column representing the cell that the mouse left

cellElementHTMLElement

The cell HTML element that the mouse left

eventMouseEvent

The native DOM event

Called when a user moves the mouse out of a grid cell

new GridElementEvents({
    onCellMouseOut({ grid, record, column, cellElement, target, event }) {

    }
});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Called when user moves the mouse over a grid cell

new GridElementEvents({
    onCellMouseOver({ grid, record, column, cellElement, target, event }) {

    }
});
ParameterTypeDescription
gridGrid

The grid instance

recordModel

The record representing the row

columnColumn

The column to which the cell belongs

cellElementHTMLElement

The cell HTML element

targetHTMLElement

The target element

eventMouseEvent

The native DOM event

Called when a grid header is clicked on.

Returning false from a handler prevents any features (such as Sort) from recieving and processing the click event.

new GridElementEvents({
    onHeaderClick({ domEvent, column }) {

    }
});
ParameterTypeDescription
domEventEvent

The triggering DOM event.

columnColumn

The column clicked on.

Mouse moved out from element in grid

new GridElementEvents({
    onMouseOut({ event }) {

    }
});
ParameterTypeDescription
eventMouseEvent

The native browser event

Mouse moved in over element in grid

new GridElementEvents({
    onMouseOver({ event }) {

    }
});
ParameterTypeDescription
eventMouseEvent

The native browser event

Called when the mouse enters a row

new GridElementEvents({
    onRowMouseEnter({ source, record, column, cellElement, event }) {

    }
});
ParameterTypeDescription
sourceGrid

The grid instance

recordModel

The record representing the hovered row

columnColumn

The column currently hovered

cellElementHTMLElement

The cell HTML element

eventMouseEvent

The native DOM event

Called when the mouse leaves a row

new GridElementEvents({
    onRowMouseLeave({ source, record, cellElement, event }) {

    }
});
ParameterTypeDescription
sourceGrid

The grid instance

recordModel

The record representing the row that the mouse left

cellElementHTMLElement

The cell HTML element that the mouse left

eventMouseEvent

The native DOM event