grid里面 下面横向的滚动条始终不显示 设置了autoScroll 和bodyStyle也没用

koftt21 2015-02-05 11:09:27
/**
* UploadlookGrid表格
*
* @class net.grid.UploadlookGrid
* @extends Ext.grid.GridPanel
*/
net.grid.UploadlookGrid= Ext.extend(Ext.grid.GridPanel,{
/*( viewConfig: {
forceFit: false,
stripeRows: true
},*/
height: 300,
width: 600,
autoScroll : true,
// bodyStyle : 'overflow-x:scroll; overflow-y:scroll',
initComponent:function() {
var ds = new Ext.data.Store({
url:'./showRefreshFileByParams.action',
reader:new Ext.data.JsonReader({
root:'list',
totalProperty:'recordSize',
id:'id'
},['refreshId','explain','fileName','path','projectName','projectType','type','typeName']),
baseParams:{
limit:pageSize
}// ,
// remoteSort:true
});
var sm = new Ext.grid.CheckboxSelectionModel();
var cm = new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),
sm,
{header:'编号',width:100,autoScroll:true,sortable:true,dataIndex:'refreshId',renderer : function(value){if(value){var div = '<div ext:qtip="{0}">{0}</div>';return String.format(div,value);}}},
{header:'配置名称',width:100,sortable:true,dataIndex:'fileName',renderer : function(value){if(value){var div = '<div ext:qtip="{0}">{0}</div>';return String.format(div,value);}}},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置类型',width:100,sortable:true,dataIndex:'type'},
{header:'配置值',width:100,sortable:true,dataIndex:'path',renderer : function(value){if(value){var div = '<div ext:qtip="{0}">{0}</div>';return String.format(div,value);}}},
{header:'配置说明',width:100,sortable:true,dataIndex:'explain',renderer : function(value){if(value){var div = '<div ext:qtip="{0}">{0}</div>';return String.format(div,value);}}},
{header:'配置所属工程',width:100,sortable:true,dataIndex:'projectName'}//,
//{header:'缓存',sortable:true,width:30,dataIndex:'button',renderer:
// function(value, cellmeta, record, rowIndex, columnIndex,store) {
//alert(" <button type='button' onclick="+ '"' +"javascript:show('"+record.get('fileName')+"');"+'"'+" class='up'>更新 </button>");
// return " <button type='button' onclick="+ '"' +"javascript:show('"+record.get('fileName')+"');"+'"'+" class='up'>更新 </button>";
// }
// }
]);
/**
* 扩展类的构建开始
*/
Ext.apply(this,{
viewConfig : {
forceFit : true
},
store:ds
,sm:sm
,cm: cm
,bbar:new Ext.PagingToolbar({
pageSize:pageSize,
store:ds,
displayInfo:true
})
, tbar:[
// {text:'新增',cls:'x-btn-text-icon',icon:'./images/button/plugin.gif',handler:this.newZdGlobal,scope:this},'-',
{text:'修改',cls:'x-btn-text-icon',icon:'./images/button/edit.gif',handler:this.editZdGlobal,scope:this},'-',
{text:'删除',cls:'x-btn-text-icon',icon:'./images/button/del.gif',handler:this.deleteZdGlobal,scope:this},'-',
{text:'查询',cls:'x-btn-text-icon',icon:'./images/button/search.gif',handler:this.buildQueryWin,scope:this},'-',
//{text:'缓存更新',cls:'x-btn-text-icon',icon:'./images/toolbar_refresh_up.gif',handler:this.hc_update,scope:this},
'->'
]
});
// 调用父类构建函数
net.grid.UploadlookGrid.superclass.initComponent.call(this);
// 加载数据
ds.load({params:{start:0}});
// 扩展类的弹出窗口
this.SystemForm = new net.form.SystemForm();
this.SystemWin = new net.win.SystemWin({items:this.SystemForm,buttons:[{
text:'保存',
handler:this.saveZdGlobal,
scope:this
},{
text:'取消',
handler:function(){this.SystemWin.hide();},
scope:this
}]});
this.InsertSystemForm = new net.form.InsertSystemForm();
this.InsertSystemWin = new net.win.InsertSystemWin({items:this.InsertSystemForm,buttons:[{
text:'保存',
handler:this.saveZdGlobal1,
scope:this
},{
text:'取消',
handler:function(){this.InsertSystemWin.hide();},
scope:this
}]});
this.SearchSystemForm = new net.form.SearchSystemForm();
this.SearchSystemWin = new net.win.SearchSystemWin({items:this.SearchSystemForm,buttons:[{
text:'搜索',
handler:this.searchZdGlobal,
scope:this
},{
text:'取消',
handler:function(){this.SearchSystemWin.hide();},
scope:this
}]});

// 双击操作
this.on({"dblclick":this.dblclick});
this.addListener('rowcontextmenu', this.onMessageContextMenu);
}
/**
* 构建函数结束
*/
// 右键菜单
,onMessageContextMenu : function (grid, rowIndex, e) {
e.stopEvent();

代码如上 里面设置了autoScroll : true, bodyStyle : 'overflow-x:scroll; overflow-y:scroll', 都没用
现在的样子浏览器没放最大 竖的有 横的就是没有 怎么设置属性都没用 这是为什么???
...全文
1298 6 打赏 收藏 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
koftt21 2015-02-09
  • 打赏
  • 举报
回复
引用 5 楼 zebro1573 的回复:
把多余的autoScoll:true,不要,只留grid的
去掉多余的autoScoll:true 加flex: 了 还是不显示
zebro1573 2015-02-07
  • 打赏
  • 举报
回复
把多余的autoScoll:true,不要,只留grid的
koftt21 2015-02-06
  • 打赏
  • 举报
回复
引用 1 楼 zhoucc910311 的回复:
把分页挪一挪,挡住了
分页去掉了 还是没有 郁闷 这些问题真头疼
koftt21 2015-02-06
  • 打赏
  • 举报
回复
引用 2 楼 zebro1573 的回复:
不要指定 宽度,用flex:1,flex2
你的提议没效果 还是不显示
zebro1573 2015-02-05
  • 打赏
  • 举报
回复
不要指定 宽度,用flex:1,flex2
zhoucc910311 2015-02-05
  • 打赏
  • 举报
回复
把分页挪一挪,挡住了

87,984

社区成员

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

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