jqGrid单元格编辑 - 双击单击编辑? [英] jqGrid Cell Editing - Double Click to Edit?

查看:5627
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆