0

このグリッドとフォームパネルがあります。フォーム パネルにデータのグリッドを追加し、フォーム パネルのボタンを引き続き使用したいと考えています。

      myGrid= Ext.create('Ext.grid.Panel',{
            layout: {
                type: 'fit'
            },

            id: 'gridId',
            title: null,
            store: myDataStore,
            columns: [{
                header: 'header 1',
                dataIndex: 'index_1',
                width: 120
            }, {
                header: 'header 2',
                dataIndex: 'index_2',
                width: 120
            }, {
                header: 'header 3',
                dataIndex: 'index_3',
                width: 120
            }],
            stripeRows: true
        })

        formPanel= Ext.create('Ext.form.Panel',{
            id:'panelId',

            items:[myGrid],
            buttons: [{
                 // cancel, save, other buttons
            }]
        })

しかし、私はこのエラーが発生します

HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy

私は何を間違っていますか?

4

1 に答える 1

1

設定後にセミコロンを忘れましたExt.create()

ここではうまく機能しているようです。私はフィドルを作りました

http://jsfiddle.net/WGgR8/1/

于 2012-11-29T08:14:48.333 に答える