📘
Slickgrid-React
Live DemoGitHub
  • Introduction
  • Getting Started
    • Quick start
  • Styling
    • Dark Mode
    • Styling CSS/SASS/Themes
  • Column Functionalities
    • Cell Menu (Action Menu)
    • Editors
      • Autocomplete
      • new Date Picker (vanilla-calendar)
      • LongText (textarea)
      • Select Dropdown Editor (single/multiple)
    • Filters
      • Autocomplete
      • Input Filter (default)
      • Select Filter (dropdown)
      • Compound Filters
      • Range Filters
      • Custom Filter
      • Styling Filled Filters
      • Single Search Filter
    • Formatters
    • Sorting
  • Events
    • Available events
    • On Events
  • Slick Grid/DataView Objects
    • Slick Grid/DataView Objects
  • Grid Functionalities
    • Auto-Resize / Resizer Service
    • Resize by Cell Content
    • Column Picker
    • Composite Editor Modal
    • Custom Tooltip
    • Add, Update or Highlight a Datagrid Item
    • Dynamically Add CSS Classes to Item Rows
    • Column & Row Spanning
    • Context Menu
    • Custom Footer
    • Excel Copy Buffer Plugin
    • Export to Excel
    • Export to File (csv/txt)
    • Grid Menu
    • Grid State & Presets
    • Grouping & Aggregators
    • Header & Footer Slots
    • Header Menu & Header Buttons
    • Infinite Scroll
    • Pinning (frozen) of Columns/Rows
    • Providing data to the grid
    • Row Detail
    • Row Selection
    • Tree Data Grid
    • Row Based Editing Plugin
  • Developer Guides
    • CSP Compliance
  • Localization
    • with I18N
    • with Custom Locales
  • Backend Services
    • Custom Backend Service
    • OData
    • GraphQL
      • JSON Result Structure
      • Filtering Schema
      • Pagination Schema
      • Sorting Schema
  • Testing
    • Testing Patterns
  • Migrations
    • Migration Guide to 3.x (2023-05-29)
    • Migration Guide to 4.x (2023-12-15)
    • Migration Guide to 5.x (2024-05-10)
    • Versions 6 to 8 are skipped...
    • Migration Guide to 9.x (2025-05-10)
Powered by GitBook
On this page
  • SlickGrid and SlickDataView
  • all other events
  • CellExternalCopyManager (extension)
  • Context Menu / Cell Menu (extension)
  • Column Picker (extension)
  • Grid Menu (extension)
  • Header Buttons (extension)
  • Header Menu (extension)
  • Filter Service
  • Grid Service
  • GridState Service
  • Pagination Service
  • Resizer Service
  • Sort Service
  • TreeData Service
  • Slickgrid-React Component
  • SlickGrid
  • SlickDataView
Edit on GitHub
  1. Events

Available events

(see below for full list of events)

All the events are published with a data payload in a CustomEvent, so you will typically find the payload under the detail property of the CustomEvent. However please note that the events from SlickGrid and SlickDataView, shown at the bottom of the list, are published with a different structure which is also including the JS event that it was triggered with under the property eventData and the payload itself is under the args property (which follows original SlickGrid structure). To subscribe to all events, you can use your PubSub instance (if available) or add listeners on your grid container DOM element.

SlickGrid and SlickDataView

// 1. with PubSub instance
reactGridRef.current?.instances?.eventPubSubService?.subscribe('onCellChange', (payload) => console.log('PubSub, cell changed data:', payload));

// 2. with CustomEvent in the View (see html code below)
handleOnCellChange(e, args) {
  // `eventData` is the event it was triggered from and `args` is the data payload
  const { eventData, args } = e.detail;
  const dataContext = args?.item;
  console.log('cell changed data:', args);
}

render() {
  <SlickgridReact
      gridId='grid3'
      columns={columns}
      options={options}
      dataset={dataset}
      onReactGridCreated={e => { reactGridReady(e.detail); }}
      onCellChange={e => { handleOnCellChange(e.detail.eventData, e.detail.args); }}
    />
}

all other events

// 1. with PubSub instance
reactGridRef.current?.instances?.eventPubSubService?.subscribe('onHeaderMenuCommand', (payload) => console.log('PubSub, header menu command', payload));

// 2. with CustomEvent in the View (see html code below)
handleOnHeaderMenuCommand(e) {
  // detail is the args data payload
  const args = e.detail;
  console.log('header menu command', args);
}

render() {
  <SlickgridReact
      gridId='grid3'
      columns={columns}
      options={options}
      dataset={dataset}
      onReactGridCreated={e => { reactGridReady(e.detail); }}
      onHeaderMenuCommand={e => { handleOnHeaderMenuCommand(e.detail); }}
    />
}

CellExternalCopyManager (extension)

  • onCopyCells

  • onCopyCancelled

  • onPasteCells

  • onBeforePasteCell

Context Menu / Cell Menu (extension)

  • onContextMenuClearGrouping

  • onContextMenuCollapseAllGroups

  • onContextMenuExpandAllGroups

  • Slick Events

    • onAfterMenuShow

    • onBeforeMenuShow

    • onBeforeMenuClose

    • onCommand

    • onOptionSelected

Column Picker (extension)

  • onColumnPickerColumnsChanged

  • Slick Events

    • onColumnsChanged

Grid Menu (extension)

  • onGridMenuMenuClose

  • onGridMenuBeforeMenuShow

  • onGridMenuAfterMenuShow

  • onGridMenuClearAllPinning

  • onGridMenuClearAllFilters

  • onGridMenuClearAllSorting

  • onGridMenuColumnsChanged

  • onGridMenuCommand

  • Slick Events

    • onAfterMenuShow

    • onBeforeMenuShow

    • onBeforeMenuClose

    • onColumnsChanged

    • onMenuClose

    • onCommand

Header Buttons (extension)

  • onHeaderButtonCommand

Header Menu (extension)

  • onHeaderMenuCommand

  • onHeaderMenuColumnResizeByContent

  • onHeaderMenuBeforeMenuShow

  • onHeaderMenuAfterMenuShow

Filter Service

  • onBeforeFilterClear

  • onBeforeSearchChange

  • onFilterCleared

Grid Service

  • onHideColumns

  • onItemsAdded

  • onItemsDeleted

  • onItemsUpdated

  • onItemsUpserted

GridState Service

  • onFullResizeByContentRequested

  • onGridStateChanged

Pagination Service

  • onBeforePaginationChange

  • onPaginationChanged

  • onPaginationRefreshed

  • onPaginationPresetsInitialized

  • onPaginationVisibilityChanged

  • onPaginationSetCursorBased (for GraphQL only)

Resizer Service

  • onGridBeforeResize

  • onGridAfterResize

  • onBeforeResizeByContent

  • onAfterResizeByContent

Sort Service

  • onSortCleared

  • onSortChanged

  • onBeforeSortChange

TreeData Service

  • onTreeFullToggleStart

  • onTreeFullToggleEnd

  • onTreeItemToggled

Slickgrid-React Component

  • onBeforeGridDestroy

  • onAfterGridDestroyed

  • onBeforeGridCreate

  • onDataviewCreated

  • onGridCreated

  • onReactGridCreated

  • onGridStateChanged

SlickGrid

  • onActiveCellChanged

  • onActiveCellPositionChanged

  • onAddNewRow

  • onAfterSetColumns

  • onAutosizeColumns

  • onBeforeAppendCell

  • onBeforeCellEditorDestroy

  • onBeforeColumnsResize

  • onBeforeDestroy

  • onBeforeEditCell

  • onBeforeFooterRowCellDestroy

  • onBeforeHeaderCellDestroy

  • onBeforeHeaderRowCellDestroy

  • onBeforeRemoveCachedRow

  • onBeforeSetColumns

  • onBeforeSort

  • onBeforeUpdateColumns

  • onCellChange

  • onCellCssStylesChanged

  • onClick

  • onColumnsReordered

  • onColumnsDrag

  • onColumnsResized

  • onColumnsResizeDblClick

  • onCompositeEditorChange

  • onContextMenu

  • onDblClick

  • onDrag

  • onDragInit

  • onDragStart

  • onDragEnd

  • onFooterClick

  • onFooterContextMenu

  • onFooterRowCellRendered

  • onHeaderCellRendered

  • onHeaderClick

  • onHeaderContextMenu

  • onHeaderMouseEnter

  • onHeaderMouseLeave

  • onHeaderMouseOver

  • onHeaderMouseOut

  • onHeaderRowCellRendered

  • onHeaderRowMouseEnter

  • onHeaderRowMouseLeave

  • onHeaderRowMouseOver

  • onHeaderRowMouseOut

  • onKeyDown

  • onMouseEnter

  • onMouseLeave

  • onPreHeaderClick

  • onPreHeaderContextMenu

  • onRendered

  • onScroll

  • onSelectedRowsChanged

  • onSetOptions

  • onActivateChangedOptions

  • onSort

  • onValidationError

  • onViewportChanged

SlickDataView

  • onBeforePagingInfoChanged

  • onGroupExpanded

  • onGroupCollapsed

  • onPagingInfoChanged

  • onRowCountChanged

  • onRowsChanged

  • onRowsOrCountChanged

  • onSelectedRowIdsChanged

  • onSetItemsCalled

PreviousSortingNextOn Events

Last updated 23 days ago