[英]Error when adding ext.grid.panel into ext.form.panel
I have this grid and form panels. 我有这个网格和表格面板。 I want to add a grid of data into the form panel and still have buttons from the form panel.
我想将数据网格添加到表单面板中,但仍然有来自表单面板的按钮。
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
}]
})
But I get this error 但是我得到这个错误
HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy
what do I do wrong? 我做错了什么?
You forgot semicolons after your Ext.create()
config. 您在
Ext.create()
配置之后忘记了分号。
Seems to work just fine here. 似乎在这里可以正常工作。 I made a fiddle
我做了一个小提琴
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.