标签:reset last 定义 close selectrow targe bind res 编辑
var lastsel; //在顶部定义
onSelectRow:function(id){
if(id && id!==lastsel){
$(tableid).jqGrid(‘saveRow‘,lastsel);
lastsel=id;
}
$(tableid).editRow(id, true);
BkcTool.clearEdit(tableid,lastsel)
}//加上grid代码处。
$(‘html‘).bind(‘click‘, function(e) { //用于点击其他地方保存正在编辑状态下的行
if ( lastsel != "" ) {
if($(e.target).closest(tableid).length == 0) {
jQuery(tableid).jqGrid(‘saveRow‘, lastsel);
jQuery(tableid).resetSelection();
lastsel="";
}
}
});
标签:reset last 定义 close selectrow targe bind res 编辑
原文地址:https://www.cnblogs.com/x-g-a/p/9909239.html