网格在窗口中选择级别

时间:2015-07-01 11:21:27

标签: extjs grid

你好我有网格窗口,但网格在所有面板下,我怎么能拿起网格

 {
                xtype: 'bookgrid',
                name: 'bookgrid_name',
                autoHeight: true,
                viewConfig: {
                    plugins: {
                        ptype: 'gridviewdragdrop',
                        dragGroup: 'resourcesDDGroup'
                    },
                    listeners: {
                    },
                    copy: true
                }
            }

enter image description here

1 个答案:

答案 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');