当单击保存按钮代替编辑url时,jqgrid调用自定义函数
下面是我的代码当单击保存按钮代替编辑url时,jqgrid调用自定义函数,jqgrid,Jqgrid,下面是我的代码 onSelectRow : function(id) { $("#order_list").setGridParam({ 'editurl' : 'clientArray' }); } }); jQuery("#order_list").jqGrid('navGrid',"#pjmap",{edit:false,add:false,del:false,search: f
onSelectRow : function(id) {
$("#order_list").setGridParam({
'editurl' : 'clientArray'
});
}
});
jQuery("#order_list").jqGrid('navGrid',"#pjmap",{edit:false,add:false,del:false,search: false, refresh:false,cloneToTop:true});
jQuery("#order_list").jqGrid('inlineNav', '#order_list_toppager',{add:false,del:false,edit:true,search: false, refresh:false,cloneToTop:true, viewtext:"View", edittext:"Edit", savetext:"Save", canceltext:"Cancel"});
嗨
通过在aftersavefunc的参数中添加函数,可以创建自己的保存函数。我的代码如下:
$('#jqGridOutput').navGrid("#jqGridPagerOutput", { edit: false, add: false, del: true, refresh: false, view: false }, {}, {}, delSettings);
$('#jqGridOutput').inlineNav('#jqGridPagerOutput',
{
edit: true,
del: true,
add: true,
cancel: false,
editParams: {
aftersavefunc: function (id) { //what should happen on save edit row },
keys: true,
},
addParams: {
keys: true,
position: "last",
aftersavefunc: function (id) { //what should happen on save new row }
},
});
我想,如果我理解正确的话,这就是你想要的 你的代码被截取了。我试图修改代码格式,但我的编辑器崩溃了。请将截取的代码的所有相关部分发布,并尝试格式化代码。