[英]jqgrid - why after jquery.ajax(type:html) then jqgrid reload event not working?
:) :)
I have a problem with jqgrid. 我对jqgrid有问题。
I'm using two pages. 我正在使用两页。
The main page(=call "A") has a one jqgrid. 主页(=呼叫“ A”)有一个jqgrid。
and it's simple grid. 这是简单的网格。
The second page(=call "B") are call from page "A" via jquery ajax (dataType : "html"). 第二页(= call“ B”)是通过jquery ajax(dataType:“ html”)从页面“ A”调用的。
And "B" page has two jqgrid as a inlineHTML. 并且“ B”页面有两个jqgrid作为inlineHTML。
========= =========
And now the problem is, after loaded "B" page (no problem in "B" page). 现在的问题是,加载“ B”页面后(“ B”页面中没有问题)。 In "A" page.
在“ A”页面中。 The $grid.trigger("reloadGrid");
$ grid.trigger(“ reloadGrid”); is not working.
不管用。
But if not use jquery.ajax event, then "A" page works. 但是,如果不使用jquery.ajax事件,则“ A”页面有效。
========= =========
here is my source. 这是我的消息来源。
[1] page > "A" > call method "B" [1]页面>“ A”>调用方法“ B”
$.ajax({
url: "B.html",
dataType : "html" }).done(function(result) {
$('#div_memberSearchPopup').bPopup({ // content:'ajax' //'ajax', 'iframe' or 'image' // contentContainer:'.memberSearchPopup_content'
zIndex: 2 // , modalClose: false
, positionStyle: 'fixed'
, follow: [false, false]
, position: [100, 100]
, onOpen: function() {
$('#div_memberSearchPopup').find(".memberSearchPopup_content").html(result);
$('#div_memberSearchPopup').draggable();
}
});
});
[2] page > "B" > reload method "A".trigger("reloadGrid") [2]页面>“ B”>重新加载方法“ A” .trigger(“ reloadGrid”)
$gridElement.jqGrid('clearGridData')
.jqGrid('setGridParam', {
url : "A.html",
page : 1,
mtype : "get",
contentType: "application/json",
dataType : "json",
postData : dataValue,
loadComplete: function(){
if(typeof loadCompleteFunc === 'function') {
loadCompleteFunc();
}
}
}).trigger("reloadGrid");
Thanks for read this question. 感谢您阅读此问题。
I resolved my problem. 我解决了我的问题。
The problem is included duplicated javascript library. 该问题包括重复的javascript库。
I are using tile template then in template's has a includes. 我正在使用图块模板,然后在模板中包含一个。
So I resolved i my self! 所以我解决了我的自我! Thanks all!!!
谢谢大家!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.