你好我有网格窗口,但网格在所有面板下,我怎么能拿起网格
{
xtype: 'bookgrid',
name: 'bookgrid_name',
autoHeight: true,
viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
dragGroup: 'resourcesDDGroup'
},
listeners: {
},
copy: true
}
}
答案 0 :(得分:0)
您可以在控制器上使用两个选项:
向下 http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.dom.Element-method-down
var me = this.getView();
me.down('bookgrid[name="bookgrid_name"]);
lookupReference http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.container.Container-method-lookupReference
{
xtype: 'bookgrid',
name: 'bookgrid_name',
reference: 'myBookGrid',
autoHeight: true,
viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
dragGroup: 'resourcesDDGroup'
},
listeners: {
},
copy: true
}
}
控制器中的 - > var grid = this.lookupReference('myBookGrid');