Grid 无法读取属性';iTree';未定义Extjs 4的定义

Grid 无法读取属性';iTree';未定义Extjs 4的定义,grid,extjs4,migration,extjs4.2,extjs2,Grid,Extjs4,Migration,Extjs4.2,Extjs2,我试图将代码从extjs2更新到extjs4,但我有一个错误,grid。我的Google Chrome浏览器返回错误无法读取未定义的属性“isTree” Ext.define('App.grid.GridPanel', { extend: 'Ext.grid.GridPanel', alias: 'widget.gridpanel', frame: false, loadMask: true, stateful: false, enable

我试图将代码从extjs2更新到extjs4,但我有一个错误,
grid
。我的Google Chrome浏览器返回错误
无法读取未定义的属性“isTree”

    Ext.define('App.grid.GridPanel', {
    extend: 'Ext.grid.GridPanel',
    alias: 'widget.gridpanel',
    frame: false,
    loadMask: true,
    stateful: false,
    enableColumnHide: false,
    showGridHeader: true,
    viewConfig: {        
        stripeRows: true
    },

    initComponent: function() {
        if (!this.showGridHeader) {
            this.addClass('grid-no-header');
        }

        App.grid.GridPanel.superclass.initComponent.apply(this, arguments);
    },

    getView : function(){
        if(!this.view){
            this.view = new App.grid.GridView(this.viewConfig);
        }
        return this.view;
    }
});
var grid=new App.grid.GridPanel({ 店:店,, 列:gridColumns, 帧:假, //autoExpandColumn:“名称”, 自动高度:正确, loadMask:是的, bbar:pagingBar, 视图配置:{ 是的, 滚动偏移量:2 } }); 即使我更改了App.grid.GridPanel.superclass.initComponent.apply(这是参数)to
this.callParent(this,arguments)我收到了相同的错误。

请提供帮助。

您不应该使用
widget.gridpanel
作为网格的别名,因为已经有一个X类型的
gridpanel

还有getView是怎么回事?您没有为它提供实现

在initComponent方法中,按照指南中的说明使用此.callParent()


将配置减少到最小值以使其处于工作状态,然后逐件添加您认为必要的内容。

您不应使用
小部件.gridpanel
作为网格的别名,因为已经有一个xtype的
gridpanel

还有getView是怎么回事?您没有为它提供实现

在initComponent方法中,按照指南中的说明使用此.callParent()


将配置减少到最低限度以使其符合工作顺序,然后逐件添加您认为必要的内容。

下面的答案有用吗?下面的答案有用吗? var grid = new App.grid.GridPanel({ store: store, columns: gridColumns, frame: false, // autoExpandColumn: 'name', autoHeight: true, loadMask: true, bbar: pagingBar, viewConfig: { stripeRows: true, scrollOffset: 2 } });