问题描述
当用户单击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事件jqGridBeforeSelectRow
和jqGridCellSelect
也将被调用.
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
回调)的其他参数尚未提供您所需要的.旧的答案:答案,这一个,这一个,,这一个,和其他许多示例为您提供了onCellSelect
和beforeSelectRow
回调用法的示例.
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如何编写单元格单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!