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);
}