ext设置grid高度方法不好使

时间:2024-10-13 23:27:14

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":"[email protected]", "phone":"555-111-1224" }, { 'name': 'Bart', "email":"[email protected]", "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高度方法不好使
© 手抄报圈