问题描述
我想在用户单击 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
推荐答案
回调和jQuery事件描述这里.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 事件对象),其中 target 属性可用于获取有关的所有信息如果 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如何编写单元格点击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!