首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Ajax >

Ext xtype=grid 改成 editorgrid有关问题

2013-09-12 
Ext xtypegrid 改成 editorgrid问题var store Ext.create(Ext.data.Store, {fields: [id, username

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

热点排行