jqgrid保存被编辑行 本帖最后由 Dom137067172 于 2013-06-19 10:59:10 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你调用了$("#jqgajax").restoreRow(lastsel);恢复方法 ==restoreRow 我也遇到这样的问题,我每次编辑完了之后都要点击保存按钮或者按回车才可以保存,能不能实现,我选中下一行的时候自动保存这一行onSelectRow:function(id){ if(id && id!==lastsel){ $("#"+tableName).jqGrid("restoreRow",lastsel); $("#"+tableName).jqGrid("editRow",id,{ keys : true, //这里按[enter]保存 url: "edit"+actionName, mtype : "POST", restoreAfterError: true, extraparam: { // "ware.id": rowData.id, // "ware.warename": $("#"+id+"_name").val(), // "ware.createDate": $("#"+id+"_date").val(), // "ware.number": $("#"+id+"_amount").val(), // "ware.valid": $("#"+id+"_type").val() }, oneditfunc: function(rowid){ //alert(rowid); console.log(rowid); }, succesfunc: function(response){ alert("save success"); return true; }, errorfunc: function(rowid, res){ console.log(rowid); console.log(res); } }); lastsel=id; } }, jquery 地址链接 execCommand("Paste")和自己直接CTRL+V粘贴表格,居然结果不一样! 求能够跨Frame的多级菜单组件 一个很好的相册切换效果(散分来了) 谁有用表格实现的文本滚动公告牌 怎样让滚动条的字首先从右边滑进来? 菜鸟问题:如何用 JavaScript 实现图片上传 ? *****关于windows剪贴板问题(100分)***** 一个Array随机排序的脚本,理论上是完全随机的,但不知道搞什么贵,实际上却不是。 如何把php文件伪装成js文件 jqueryEasyUI TreeGrid 关于html5
恢复方法 ==restoreRow
onSelectRow:function(id){
if(id && id!==lastsel){
$("#"+tableName).jqGrid("restoreRow",lastsel);
$("#"+tableName).jqGrid("editRow",id,{
keys : true, //这里按[enter]保存
url: "edit"+actionName,
mtype : "POST",
restoreAfterError: true,
extraparam: {
// "ware.id": rowData.id,
// "ware.warename": $("#"+id+"_name").val(),
// "ware.createDate": $("#"+id+"_date").val(),
// "ware.number": $("#"+id+"_amount").val(),
// "ware.valid": $("#"+id+"_type").val()
},
oneditfunc: function(rowid){
//alert(rowid);
console.log(rowid);
},
succesfunc: function(response){
alert("save success");
return true;
},
errorfunc: function(rowid, res){
console.log(rowid);
console.log(res);
}
});
lastsel=id;
}
},