jqgrid如何编写单元格单击事件 [英] Jqgrid how to write cell click event

查看:339
本文介绍了jqgrid如何编写单元格单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户单击jqgrid的单元格时,我想编写一个事件.有内置方法吗? 我在此链接

I want to write an event when user click on a cell of jqgrid. Is there build in method? I could not find any event at this link

推荐答案

此处. jqGrid在网格主体上注册click处理程序.在click处理程序内部,将调用回调beforeSelectRow和更高版本的onCellSelect.同样,jQuery事件jqGridBeforeSelectRowjqGridCellSelect也将被调用.

Callbacks and jQuery events are described here. jqGrid register click handler on the body of the grid. Inside of the click handler the callbacks beforeSelectRow and later onCellSelect will be called. In the same way jQuery events jqGridBeforeSelectRow and jqGridCellSelect will be called too.

回调和事件包含e参数( jQuery Event对象),如果 target 属性可以用于获取有关click事件的所有信息, beforeSelectRow回调(或onCellSelect回调)的其他参数尚未提供您所需要的.旧的答案:答案这一个这一个这一个

The callbacks and the events contains e parameter (jQuery Event object) which target property could be used to get all information about the click event if the other parameters of the beforeSelectRow callback (or onCellSelect callback) don't provides already what you need. The old answers: the answer, this one, this one, this one, this one, this one and many other provide you examples of the usage of onCellSelect and beforeSelectRow callbacks.

这篇关于jqgrid如何编写单元格单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆