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.