zm8859001 2016-04-15 07:09 采纳率: 0%
浏览 1664

Extjs 隐藏左边 菜单右边 tabpanel 里面的gridpanel不自适应宽度

如图所示:图片说明

代码如下
// 单击菜单,右边tabpanel 添加一个grid显示数据
var pl = new Ext.Panel({
id : node.attributes.id,
title : node.attributes.text,
border : false, // 边框
autoScroll : true, // 自动滚动条
closable : true, // 关闭选项
layout : 'fit', // 布局样式
frame : true,
region : 'center', // 中间位置
sidebarChange : false,
iconCls : 'users', // 图标样式

autoLoad : {
url : node.attributes.url,
scripts : true,
discardUrl : true,
nocache : true,
sidebarChange:false,//用于控制
text : "页面加载中,请稍候……"
}
// listeners : {
// activate : function(me, eOpts) {
// if (me.sidebarChange) {
// me.sidebarChange = false;
// me.loader.load();
//
// }
// center.setActiveTab(me); // 设置默认标签
// }
// }
});
center.add(pl);
center.setActiveTab(pl); // 设置默认标签

                grid的页面代码
                var editorGrid10 = new Ext.grid.EditorGridPanel({
id : 'editorGrid10',
frame : false, // 边框的样式,是否显示
border : false, // 是否显示边框,页面显示的效果
layout : 'fit', //布局样式
height : 450,
autoWidth : true, // 是否自动扩充宽度
//width:document.body.getComputedWidth()-100,
store : gStore, // 填充store
sm : enditsm10, // 用于显示复选框,必加,去掉该项的话列将变成单选框模式
cm : cModel10, // grid可编辑列模型,colModel简写
renderTo : Ext.get('tt'), // 表格所在的位置
autoExpandColumn : true, // 自动占满剩余空列
loadMask : {
    // 表示为当grid加载过程中,会有一个Ext.LoadMask的遮罩效果。默认为false。
    msg : '正在加载数据,请稍后!'
},
autoScroll : true, // 自动滚动条
autoEncode : true, // True表示为对任何值和任何后来输入的值都要自动HTML编码或解码
bbar : editbbarpadding10, // 面板下方的工具栏
.......后面代码省略
});


求教各路大神!
  • 写回答

1条回答

  • 精准狙M_200 2016-04-15 10:56
    关注

    查ext api吧,应该是有地方没有设置吧 http://docs.sencha.com/extjs/4.1.3/#!/example

    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题