【问题标题】:Error when adding ext.grid.panel into ext.form.panel将 ext.grid.panel 添加到 ext.form.panel 时出错
【发布时间】:2012-11-29 07:27:57
【问题描述】:

我有这个网格和表单面板。我想在表单面板中添加一个数据网格,并且仍然有来自表单面板的按钮。

      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

我做错了什么?

【问题讨论】:

标签: javascript jquery html extjs extjs4


【解决方案1】:

您在 Ext.create() 配置后忘记了分号。

似乎在这里工作得很好。我做了一个小提琴

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-02-22
    • 2021-09-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多