jqGrid 单元格编辑 - 双击编辑? [英] jqGrid Cell Editing - Double Click to Edit?
本文介绍了jqGrid 单元格编辑 - 双击编辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
默认情况下,如果 jqGrid 单元格是可编辑的,单击该单元格会将其更改为编辑模式.有什么办法可以让它通过双击进行编辑?这样可以更轻松地执行行级操作,例如删除,因为我的网格中的所有列都是可编辑的.
By default, if a jqGrid cell is editable, single click on that cell changes it to edit mode. Is there any way I can make it edit on a double click instead? It would make it easier to do row-level operations such as deleting, as all the columns in my grid are editable.
推荐答案
是的,您可以使用 ondblClickRow
事件来捕获双击.
Yes, you can use the ondblClickRow
event to capture a double-click.
下面是一个简单的示例,可以帮助您入门:
Here is a simple example to get you started:
ondblClickRow: function(){
var row_id = $("#grid").getGridParam('selrow');
jQuery('#grid').editRow(row_id, true);
}
这篇关于jqGrid 单元格编辑 - 双击编辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文