EXT3.4弹出窗口中GridPanel中不显示TBAR,BBAR

a1b3c21 2013-02-22 09:34:30
**********************弹出窗口代码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,这是什么原因,上网搜了一晚上也没能解决,哪位大侠知道啊?没多少分了,拿出一半来,感谢感谢啊!!!
...全文
1008 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
a1b3c21 2013-02-26
  • 打赏
  • 举报
回复
EXT的高手都在哪里?没有人知道吗?真心求教!
a1b3c21 2013-02-23
  • 打赏
  • 举报
回复
今天又测试了一下,把gridPanel中的height:400这句删掉后上下两个工具栏是出来了,可是数据列表却变窄了,只能显示一条记录的高度,唉,无语了。。。
a1b3c21 2013-02-22
  • 打赏
  • 举报
回复
在TABPANEL中一切都正常,在GRIDPANEL中就不行,快崩溃了!

87,992

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧