本文介绍了如何编辑在jqGrid的选定单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用内联编辑与jqGrid的,但是当我选择一个单元格,将光标在该行的第一列确定,但我想知道是否有任何方式修改当前单元格我有点击,而不是第一行
I'm using inline editing with jqGrid, but when I select a cell, the cursor is set in the first column of the row, but I'd like to know if there is any way to edit the current cell I have clicked on, instead of the first row.
先谢谢了。
推荐答案
点非常好!
我个人preFER使用ondblClickRow事件处理程序来启动编辑模式。所以,你可以使用的:
I personally prefer to use ondblClickRow event handler to start the editing mode. So you can use oneditfunc
parameter of the editRow:
ondblClickRow: function(rowid,iRow,iCol,e) {
grid.jqGrid('editRow',rowid,true,function(){
$("input, select",e.target).focus();
});
return;
}
或只需将像code的这将焦点设置的呼叫后 editRow
:
or just place the like of code which set the focus after the call of editRow
:
ondblClickRow: function(rowid,iRow,iCol,e) {
grid.jqGrid('editRow',rowid,true);
$("input, select",e.target).focus();
return;
}
这里看到相应的演示。
See the corresponding demo here.
这篇关于如何编辑在jqGrid的选定单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!