读书人

Ext xtype=grid 改成 editorgrid有关问

发布时间: 2013-09-12 22:07:00 作者: rapoo

Ext xtype=grid 改成 editorgrid问题



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

}]

ext ajax javascript
[解决办法]
要Ext.grid.plugin.RowEditing插件,下载的ext压缩包里面就有示例了

examples\grid\row-editing.html

读书人网 >Ajax

热点推荐