我需要jqgrid刷新整个页面,而不仅仅是网格 [英] I need jqgrid to refresh the entire page, not just the grid

查看:86
本文介绍了我需要jqgrid刷新整个页面,而不仅仅是网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个jqgrid,显示自动修复的作业详细信息。现在,我使用以下脚本重新加载网格,我需要更改它以便刷新整个页面,以便小计和总字段(位于网格之外)更新。这是我的相关代码,任何帮助将不胜感激:

I have a jqgrid that displays the job details of auto repairs. Right now, I have the grid reloading using the following script and I need to change it so that it refreshes the entire page so that the subtotal and total fields (that sit outside of the grid) update. Here is my relevant code, any help would be greatly appreciated:

var editOptions = {
        keys: true,
        successfunc: function () {
            var $self = $(this);
            setTimeout(function () {
                $self.trigger("reloadGrid");
            }, 50);
        }
    };
	  
	  $grid.jqGrid('navGrid', '#pager', {add: false, edit: false, del: true, search:false},{reloadAfterSubmit:true,afterSubmit:commonSubmit,closeAfterEdit:true,width:"400"},{reloadAfterSubmit:true,afterSubmit:commonSubmit,closeAfterAdd:false,width:"400"},{url:"editGrid.cfc?method=delUser",closeAfterDelete:true,reloadAftersubmit:false,afterSubmit:commonSubmit,caption:"Delete",msg:"Delete selected",width:"400"});
	  
	  $grid.jqGrid('inlineNav', '#pager', {addParams:{position:"last",addRowParams:editOptions},editRowParams:editOptions});
  });





顺便说一下,我尝试更改$ self.trigger(reloadGrid); to $ self.trigger(location.reload());但这只会使新行消失,直到我使用F5手动刷新页面。 (我也试过resetForm()并得到了相同的结果)



By the way, I tried changing $self.trigger("reloadGrid"); to $self.trigger("location.reload ()"); but that just makes the new row disappear until I refresh the page manually using F5. (I also tried resetForm() and got the same results)

推荐答案

self =
self =


);
setTimeout(function(){
(this); setTimeout(function () {


self .trigger( reloadGrid);
}, 50 );
}
};

self.trigger("reloadGrid"); }, 50); } };


这篇关于我需要jqgrid刷新整个页面,而不仅仅是网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆