我是jqGrid的新手,我真的需要帮助。
单击“提交”后,我想更新行而不使用Ajax重新加载页面。告诉我我需要写什么。
我的代码
我能够通过更新页面来更新数据,但是我需要不进行更新
查看
/other/location/otherPrepo>git checkout the-branch-wanted
/other/location/otherPrepo>cp -R * -R /target/location/targetRepo/targetFolder/
/other/location/otherPrepo>rm -rf /target/location/targetRepo/targetFolder/.git*
/other/location/otherPrepo>cd /target/location/targetRepo/
/target/location/targetRepo/>git add targetFolder
/target/location/targetRepo/>git commit -m "added files from otherPrepo"
控制器
{
//edit
url: '@Url.Action("Edit", "TableDocument")',
closeAfterEdit: true,
height: 250,
width: 400,
afterSubmit: function(responce) {
$("#jqg").jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid');
return [true, responce.responseText];
}
},
答案 0 :(得分:0)
您应将reloadAfterSubmit option设置为false
{
//edit
url: '@Url.Action("Edit", "TableDocument")',
closeAfterEdit: true,
reloadAfterSubmit : false,
height: 250,
width: 400,
afterSubmit: function(responce) {
$("#jqg").jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid');
return [true, responce.responseText];
}
},