JQGrid 里边Inline编辑时按 Esc 触发什么事件?【答案在这】
2013-03-28 21:02
459 查看
JQGrid 里边Inline编辑时按Enter之类的都对应有事件处理,但 Esc 却没有开放事件接口,那它会触发什么事件呢?
通过查找,在http://stackoverflow.com/questions/2718351/jqgrid-inline-editing-event-on-esc-cancel找到了答案,
The jqGrid source code for
the following handler for the Escape key:
So an event is raised. According to the docs:
afterrestorefunc if defined this function is called in after the row is restored. To this function we pass the rowid
因此,我们只需要在editrow 或 addrow 中的 afterresorefunc 里添加上代码就行了。
通过查找,在http://stackoverflow.com/questions/2718351/jqgrid-inline-editing-event-on-esc-cancel找到了答案,
The jqGrid source code for
editRowcontains
the following handler for the Escape key:
[code]if (e.keyCode === 27) {$($t).jqGrid("restoreRow",rowid, afterrestorefunc);}
So an event is raised. According to the docs:
afterrestorefunc if defined this function is called in after the row is restored. To this function we pass the rowid
因此,我们只需要在editrow 或 addrow 中的 afterresorefunc 里添加上代码就行了。
相关文章推荐
- 偶然发现一个iGoogle彩蛋 猜猜看触发事件是什么
- MSCRM4.0如何使js事件在批量编辑表单中触发
- jqGrid在编辑时(Form类型的)回车保存,esc退出(关闭)编辑
- Winform的DataGridView控件在编辑单元格时事件触发顺序
- 用visual event查看鼠标事件触发了什么jquery代码
- Swing JTable的一些用法:单元格触发事件、设置可编辑单元格
- 【JqGrid】jqGrid 多选复选框 编辑列 方法事件
- GridView触发删除,编辑事件
- DataGridView DataGridViewCheckBoxColumn编辑时实时触发事件
- 触发窗体事件(例如按Esc关闭窗体)
- [转]触发窗体事件(例如按Esc关闭窗体),WinForm
- DataGridView DataGridViewCheckBoxColumn编辑时实时触发事件
- MSCRM4.0如何使js事件在批量编辑表单中触发
- gridview 双击行触发编辑(更新)事件
- 代码触发表格编辑事件
- EXTJS 4.2 资料 控件之Grid 行编辑绑定下拉框,并点一次触发一次事件
- DataGridView DataGridViewCheckBoxColumn编辑时实时触发事件
- android中MotionEvent.ACTION_CANCEL事件是什么意思,如何触发
- Button获得focus后触发什么事件?
- jqGrid在请求前触发的事件和点击翻页时判断点击了上一页还是下一页