Extjs grid的水平滚动条

LittleLeeZi 2014-03-18 10:29:31
到底该怎样设置才能让grid出现水平滚动条啊?
百度上看了很多资料,该配置的都配置了,只有在火狐下偶尔出现滚动条,还不是一直出现,其它浏览器直接没效果。我的代码如下:
var grid=Ext.create('Ext.grid.Panel', {
renderTo : 'grid',
width : "99%",
emptyText:"无数据",
margin:'5',
store : sites_store,
viewConfig : {
forceFit : false,
scroll:'horizontal',
autoScroll:true
},
selModel:Ext.create('Ext.selection.CheckboxModel'),
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
columns : [{
text : '编号',
dataIndex : 'no'
}, {
text : '名称',
dataIndex : 'name'
}, {
text : '类型',
dataIndex : 'type'
}, {
text : '繁忙程度',
dataIndex : 'busyLevel'
}, {
text : '省/州',
dataIndex : 'pro'
}, {
text : '城市',
dataIndex : 'city'
}, {
text : '县/区',
dataIndex : 'county'
}, {
text : '管理员',
dataIndex : 'man'
}, {
text : '启用时间',
dataIndex : 'startUseTime',
width:200
}, {
text : 'mac地址',
dataIndex : 'mac'
// hidden:true
}, {
text : '经度',
dataIndex : 'long'
// hidden:true
}, {
text : '纬度',
dataIndex : 'lat'
// hidden:true
}],
tbar:{
items: [
{xtype: "button",text: "查看",handler:show,iconCls:"show"},
{xtype:"tbseparator"},
{xtype: "button",text: "新增",handler:addSite,iconCls:"add"},
{xtype:"tbseparator"},
{xtype: "button",text: "修改",handler:modSite,iconCls:"update"},
{xtype:"tbseparator"},
{xtype: "button",text: "删除",handler:delSite,iconCls:"del"},
{xtype: "button",id:"btn_excel",text: "导出为Excel",handler:genExcel,iconCls:"excel"},
'->',
{xtype: "button",text: "从Excel导入数据",handler:import_excel,iconCls :"excel_import"}]
},
bbar: new Ext.PagingToolbar({
store: sites_store,
displayInfo: true,
displayMsg: '显示第{0}条到{1}条记录,共 {2} 条',
emptyMsg: "没有记录"
})
});
...全文
179 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
LittleLeeZi 2014-03-18
  • 打赏
  • 举报
回复
秒沉了吗?求助啊
LittleLeeZi 2014-03-18
  • 打赏
  • 举报
回复
引用 2 楼 yeness 的回复:
autoScroll: true, ui 不用手写:http://www.sencha.com/products/architect/
不行啊,我也加了啊,没效果啊
xuan.ye 2014-03-18
  • 打赏
  • 举报
回复
autoScroll: true, ui 不用手写:http://www.sencha.com/products/architect/

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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