Extjs LiveGrid不呈现数据

时间:2013-02-20 18:04:30

标签: extjs rendering

你好,我有Extjs LiveGrid控件的问题。在extjs 3.1中开发的OUr产品,我们不能使用无限网格,因为它只支持extjs 4.所以计划使用livegrid控件。但是,当我们得到启示时,我得到了以下错误:

UnCaught RangeError:超出最大调用堆栈大小。

以下是实施代码:

var params = {session:this.session,filter:filter,sortBy:sortBy,dir:dir,start:0,limit:25};         this.myView = new Ext.ux.grid.livegrid.GridView({              nearLimit:35,             loadMask:{                 msg:'缓冲。请耐心等待...'             }         });

    this.grid = new Ext.ux.grid.livegrid.GridPanel({
        stripeRows: true,
        columnLines: true,
        enableDragDrop: false,
        cm: new Ext.grid.ColumnModel([
            { header: "UserId", align: 'left', width: 160, sortable: true, dataIndex: 'UserId' }
            , { header: "Username", align: 'left', width: 160, sortable: true, dataIndex: 'Username' },
            { header: "LastName", align: 'left', width: 160, sortable: true, dataIndex: 'LastName' },
            { header: "FirstName", align: 'left', width: 160, sortable: true, dataIndex: 'FirstName' },
            { header: "EmailAddress", align: 'left', width: 160, sortable: true, dataIndex: 'EmailAddress' },
             { header: "Suspended", align: 'left', width: 160, sortable: true, dataIndex: 'Suspended' }

        ]),
        loadMask: {
            msg: 'Loading...'
        },
        title: 'Large table',
        height: 400,
        stripeRows: true,
        width: 600,
          store: new Ext.ux.grid.livegrid.Store({
            autoLoad: true,
            bufferSize: 20,
            proxy: new Ext.data.DirectProxy({
                directFn: DirectRequest.GetUserManagementItems
            }),
            reader: new Ext.ux.grid.livegrid.JsonReader({
                root: 'data',
                id: 'id'
            }, [
            { name: 'UserId', type: 'int' }
            ,{ name: 'Username', type: 'string' },
            { name: 'LastName', type: 'string' },
            { name: 'FirstName', type: 'string' },
            { name: 'EmailAddress', type: 'string' }
            ,{ name: 'Suspended', type: 'boolean' }
            ])
        }), 
        selModel: new Ext.ux.grid.livegrid.RowSelectionModel(),
        view: this.myView ,
       bbar: new Ext.ux.grid.livegrid.Toolbar({
           view: this.myView ,
            displayInfo: true
        })
    });

    this.cont = new Ext.Container(
    {
        id: this.id,
        anchor: this.anchor,
        layout: 'anchor',
        items:
        [
            {
                xtype: 'container',
                height: 35,
                id: this.id + 'top'
            },
             this.grid
        ]
    });

0 个答案:

没有答案