Ext xtype=grid 改成 editorgrid问题
ext ajax javascript
var store= Ext.create('Ext.data.Store', {
fields: ['id', 'username', 'password'],
proxy: {
type: 'ajax',
url:'userlogin!list.action',
reader: {
type: 'json',
root: 'users'
}
},
autoLoad:true
});
var productPanel = new Ext.Panel({
title : ' 模块 1 ',
//layout : 'fit',
id:'productPanel',
bbar : [{
text : '添加',
iconCls : 'add',
handler :showAddBook
}, {
text : '删除',
iconCls : 'remove',
handler :removeUser
}, {
text : '修改',
iconCls : 'option'
}
],
defaults : {
// applied to each contained panel
bodyStyle : 'padding:0px'
},
layout: {
type: 'accordion',
animate: true
},
items : [{
title : '参数配置',
xtype: 'grid',
id:'testGrid',
columns: [
{ text: 'Id', dataIndex: 'id' },
{ text: 'Username', dataIndex: 'username', flex: 1 },
{ text: 'Password', dataIndex: 'password' }
]
,store:store
}]