- Parameter(s):
- $event_name: Event name from one of the following available events
-
- jqGridAfterAddRow
- jqGridAfterChangeRowid
- jqGridAfterDelRow
- jqGridAfterInsertRow
- jqGridAfterLoadComplete
- jqGridAfterSetRow
- jqGridAfterResizeDblClick
- jqGridBeforeInitGrid
- jqGridBeforeProcessing
- jqGridBeforeRequest
- jqGridBeforeSelectRow
- jqGridGridComplete
- jqGridLoadBeforeSend
- jqGridLoadComplete
- jqGridDblClickRow
- jqGridHeaderClick
- jqGridInitGrid
- jqGridPaging
- jqGridRightClickRow
- jqGridSelectAll
- jqGridSelectRow
- jqGridShowHideCol
- jqGridSortCol
- jqGridRemapColumns
- jqGridResizeDblClick
- jqGridResizeStart
- jqGridResizeStop
- jqGridResetFrozenHeights
- jqGridGroupingClickGroup
- jqGridAddEditAfterClickPgButtons
- jqGridAddEditAfterComplete
- jqGridAddEditAfterShowForm
- jqGridAddEditAfterSubmit
- jqGridAddEditBeforeCheckValues
- jqGridAddEditBeforeInitData
- jqGridAddEditBeforeShowForm
- jqGridAddEditBeforeSubmit
- jqGridAddEditClickPgButtons
- jqGridAddEditClickSubmit
- jqGridAddEditInitializeForm
- jqGridAddEditSerializeEditData
- jqGridViewBeforeInitData
- jqGridViewBeforeShowForm
- jqGridDeleteAfterShowForm
- jqGridAddEditAfterComplete
- jqGridDeleteBeforeInitData
- jqGridDeleteBeforeShowForm
- jqGridAfterDelRow
- jqGridFilterAfterChange
- jqGridFilterAfterShow
- jqGridFilterInitialize
- jqGridFilterBeforeShow
- jqGridInlineBeforeAddRow
- jqGridInlineBeforeCancelRow
- jqGridInlineBeforeEditRow
- jqGridInlineBeforeSaveRow
- jqGridInlineAfterRestoreRow
- jqGridInlineEditRow
- jqGridInlineSaveRowValidation
- jqGridInlineAfterSaveRow
- jqGridInlineSerializeSaveData
- jqGridInlineSuccessSaveRow
- jqGridInlineErrorSaveRow
- jqGridBeforeEditCell
- jqGridAfterEditCell
- jqGridSerializeSubGridData
- jqGridSubGridBeforeCollapse
- jqGridSubGridBeforeExpand
- jqGridSubGridRowExpanded
jqGrid events
Grouping event
Form editing events
Form view events
Form deleting events
Searching form
Inline editing events
Cell editing events
Subgrid events
-
- $js_event_handler: JavaScript event handler to the specified event
- $event_name: Event name from one of the following available events
- Description:
- Custom event handler. A list of jqGrid events and parameters.
- Remark:
- This is an advanced method. The event handlers are essentially JavaScript.
- Native javascript events are always supported.
- Example:
You can also add event handler directly, even add additional event handler. The following adds dropdown ‘change’ event handler when the edit form shows.
1 2 3 4 5 6 7 8 9 10 11 | <script type="text/javascript"> $(function() { var grid = jQuery("#orders"); grid.bind('jqGridAddEditAfterShowForm', () => { document.getElementById('status')?.addEventListener('change', () => console.log(this) ); }) }); </script> |