SlickGrid Events

SlickGrid exposes the following events:

  • onScroll
  • onSort
  • onHeaderContextMenu
  • onHeaderClick
  • onMouseEnter
  • onMouseLeave
  • onClick
  • onDblClick
  • onContextMenu
  • onKeyDown
  • onAddNewRow
  • onValidationError
  • onViewportChanged
  • onColumnsReordered
  • onColumnsResized
  • onCellChange
  • onBeforeEditCell
  • onBeforeCellEditorDestroy
  • onBeforeDestroy
  • onActiveCellChanged
  • onActiveCellPositionChanged
  • onDragInit
  • onDragStart
  • onDrag
  • onDragEnd
  • onSelectedRowsChanged
  • onInvalidatedRows
  • onCellCssStylesChanged

You can subscribe to the above events using a syntax similar to:

gridInstance.onXYZEvent.subscribe(function(e,args){
    //event handling code.
});

Event handlers can also be removed with

gridInstance.onXYZEvent.unsubscribe(fn);
posted @ 2012-05-09 23:57  水之原  阅读(719)  评论(0编辑  收藏  举报