forked from mleibman/SlickGrid
-
Notifications
You must be signed in to change notification settings - Fork 19
Grid Events
Jens Doose edited this page Nov 29, 2015
·
7 revisions
SlickGrid exposes the following events:
- onScroll
(args is an object with "scrollLeft" and "scrollTop" properties) - onSort
(args is an object with "multiColumnSort", "sortCol" and "sortAsc" properties) - onHeaderContextMenu
(args is an object with "column" property) - onHeaderClick
(args is an object with "column" property) - onMouseEnter
(args is an empty object) - onMouseLeave
(args is an empty object) - onClick
(args is an object with "row" and "cell" properties, containing index of row and cell) - onDblClick
(args is an object with "row" and "cell" properties) - onContextMenu
(args is an empty object) - onKeyDown
(args is an object with "row" and "cell" properties) - onAddNewRow
(args is an object with "item" and "column" properties) - onValidationError
(args is an object with these properties: "editor", "cellNode", "validationResult", "row", "cell", "column") - onViewportChanged
(args is an empty object) - onColumnsReordered
(args is an object with "impactedColumns" property) - onColumnsResized
(args is an empty object) - onCellChange
(args is an object with these properties: "row", "cell", "item") - onBeforeEditCell
(args is an object with these properties: "row", "cell", "item", "column") - onBeforeCellEditorDestroy
(args is an object with "editor" property) - onHeaderCellRendered
(args is an object with "node" and "column" properties) - onBeforeHeaderCellDestroy
(args is an object with "node" and "column" properties) - onBeforeDestroy
(args is an empty object) - onActiveCellChanged
(args is an object with "row" and "cell" properties, containing the active cell or null if there is none) - onActiveCellPositionChanged
(args is an empty object) - onDragInit
- onDragStart
- onDrag
- onDragEnd
- onSelectedRowsChanged
(args is an object with "rows" property) - onCellCssStylesChanged
(args is an object with "key" and "hash" properties) - onBeforeFooterRowCellDestroy
(args is an object with "node" and "column" properties) - onFooterRowCellRendered
(args is an object with "node" and "column" properties) - onHeaderMouseEnter
(args is an object with "column" property) - onHeaderMouseLeave
(args is an object with "column" property)
You can subscribe to the above events using a syntax similar to:
gridInstance.onXYZEvent.subscribe(function(e, args){
//event handling code.
});
The handler is called with these arguments:
e: Slick.EventData, which mimics the jQuery EventData.
args: event specific data
Event handlers can also be removed with
gridInstance.onXYZEvent.unsubscribe(fn);
Resources
- API Reference
- Grid
- Grid Options
- Column Options
- Grid Events
- DataView
- Examples
- Providing data to the grid
- Plugins & Third-party packages
Learning
Tests
Contact/Support