EXT3.4弹出窗口中GridPanel中不显示TBAR,BBAR
**********************弹出窗口代码START************************
function openPro(){
var url = './projectInfoAction!getProjectInf.action';
proWin = new Ext.Window({
id:"win",
layout:'fit',
title: '选择项目',
iconCls:'useradd_icon',
width:850,
height:500,
modal: true,
closeAction:'close',
plain: true,
buttonAlign:'center',
maximizable: false,
resizable:true,
items: [{
header:false,
html : '<iframe src="'+url+'" frameborder="0" id="myframe" scrolling="yes" width="100%" height="100%"></iframe>',
border:false
}]
});
proWin.show(this);
}
**********************弹出窗口代码END************************
**********************弹出的窗口引用的JS代码START********************
//************************ TBAR
var SearchPanel = new Ext.Toolbar({
id : 'TopSerachBar',
border : true,
frame : true,
anchor : '100%',
height : 28,
hidden: false,
width : 1000,
style : {
border : 'none'
},
items : [
' ',
'<font color=#ffffff>用户名称:</font>',
{
xtype : 'textfield',
id : 'username',
name : 'username'
},
' ',
'<font color=#ffffff>项目名称:</font>',
{
xtype : 'textfield',
id : 'project_name',
name : 'project_name'
},
{
text : '<font color=#ffffff>查询</font>',
type : "button",
cls : "x-btn-text-icon",
icon : 'image/zoom.png',
handler : function(btn, e) {
var params = SearchPanel.getForm().getValues();
params['start'] = 0;
params['limit'] = 15;
params['username'] = document
.getElementById("username").value;
params['project_name'] = document
.getElementById("project_name").value;
store.load({
params : params
});
}
} ]
});
//************************ GridPanel
var grid = new Ext.grid.GridPanel({
id : "grid",
widthpercent : '100',
// autoHeight:true,
autoWidth:true,
height : 400,
hidden: false,
trackMouseOver : false,
disableSelection : true,
stripeRows : true,
cm : cm,
sm : sm,
// 工具栏
tbar : [ SearchPanel ],
// 分页工具栏
bbar : new Ext.PagingToolbar({
beforePageText : "第",
afterPageText : "页 共 {0} 页",
pageSize : 15,
hidden: false,
store : store,
displayInfo : true,
displayMsg : '显示第{0} - {1}条 共{2}条',
emptyMsg : "没有数据需要显示"
}),
store : store,
loadMask : true
});
grid.render('topic-grid');
**********************弹出的窗口引用的JS代码 END********************
有些代码没用的我就不写了,现在问题是弹出窗口中初始化后只显示数据列表,上面的TBAR和下面的BBAR显示的是空白,什么也没有,但是奇怪的是再刷新一次当前页面后就正常显示出来了tbar和bbar,这是什么原因,上网搜了一晚上也没能解决,哪位大侠知道啊?没多少分了,拿出一半来,感谢感谢啊!!!