在添加或编辑Jqgrid提交时重新加载页面 [英] Reload page on add or edit of Jqgrid submit
本文介绍了在添加或编辑Jqgrid提交时重新加载页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的页面上有一个jqgrid,用于添加数据.我使用对话框方法进行添加,但是当用户提交时,我想刷新整个页面,而不仅仅是网格.
I have a jqgrid on my page which i use for adding data. I use the dialog method to add but when the user submits, i want to refresh the entire page, not just the grid.
有人知道我该怎么做到吗?
Does anyone know how I can achieve this?
$("#addSpecialItem").click(function () {
jQuery("#specialItemGrid").jqGrid('editGridRow', "new",
{ height: 380,
addCaption: "Special Item",
bSubmit: "Add to Order",
closeAfterAdd: true,
afterRefresh: function () {
window.location.reload();
}
});
});
推荐答案
我使用的是afterRefresh而不是afterSubmit,现在可以重新加载页面
I was using afterRefresh instead of afterSubmit, this now reload the page
afterSubmit: function () {
location.reload(true);
}
这篇关于在添加或编辑Jqgrid提交时重新加载页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文