ext设置grid高度方法不好使

 时间:2026-02-15 15:46:04

1、通过配置项height,在新建grid的时候就指定高度。

ext设置grid高度方法不好使

2、通过grid中的setHeight()方法动态指定高度。

Ext.create('Ext.data.Store', {    storeId:'simpsonsStore',    fields:['name', 'email', 'phone'],    data:{'items':[  

ext设置grid高度方法不好使

3、      { 'name': 'Lisa',  "email":"lisa@simpsons.com",  "phone":"555-111-1224"  },        { 'name': 'Bart',  "email":"bart@simpsons.com",  "phone":"555-222-1234" }    ]},    proxy: {        type: 'memory',        reader: {            type: 'json',            root: 'items'        }    }});

ext设置grid高度方法不好使

4、var grid = Ext.create('Ext.grid.Panel', {    title: 'Simpsons',    store: Ext.data.StoreManager.lookup('simpsonsStore'),    columns: [        { text: 'Name',  dataIndex: 'name' },        { text: 'Email', dataIndex: 'email', flex: 1 },        { text: 'Phone', dataIndex: 'phone' }    ],  

ext设置grid高度方法不好使

5、  height: 150,  //这里是配置项方式设置高度(方式一)

    width: 400,    renderTo: Ext.getBody()});

//这里是方法设置(方式二)

grid.setHeight(200);

ext设置grid高度方法不好使

  • struts2文件上传实例
  • js 如何获取兄弟节点值
  • java字符串数组中是否包含元素,忽略大小写
  • 怎么用jquery实现元素隐藏与显现的效果?
  • 如何搭建php环境
  • 热门搜索
    生鱼片好吃吗 麻辣香锅的家常做法 中暑的急救方法 素烧茄子的家常做法 搜索引擎大全 求职自我评价怎么写 阿根廷红虾怎么做好吃 宝宝打喷嚏流鼻涕怎么办 炒年糕怎么做好吃 身份证大全