4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
13 * @class Roo.GridPanel
14 * @extends Roo.ContentPanel
16 * Create a new GridPanel.
17 * @param {Roo.grid.Grid} grid The grid for this panel
18 * @param {String/Object} config A string to set only the panel's title, or a config object
20 Roo.ViewPanel = function(view, config){
23 this.wrapper = Roo.DomHelper.append(document.body, // wrapper for IE7 strict & safari scroll issue
24 {tag: "div", cls: "x-layout-grid-wrapper x-layout-inactive-content"}, true);
26 this.wrapper.dom.appendChild(view.el.dom);
28 Roo.ViewPanel.superclass.constructor.call(this, this.wrapper, config);
31 this.toolbar.el.insertBefore(this.wrapper.dom.firstChild);
33 // xtype created footer. - not sure if will work as we normally have to render first..
34 if (this.footer && !this.footer.el && this.footer.xtype) {
36 this.footer.container = this.wrapper.el; // this.getView().getFooterPanel(true);
37 this.footer.dataSource = this.view.store;
38 this.footer = Roo.factory(this.footer, Roo);
42 grid.monitorWindowResize = false; // turn off autosizing
43 grid.autoHeight = false;
44 grid.autoWidth = false;
46 this.grid.getGridEl().replaceClass("x-layout-inactive-content", "x-layout-component-panel");
49 Roo.extend(Roo.GridPanel, Roo.ContentPanel, {
55 * Returns the grid for this panel
56 * @return {Roo.grid.Grid}
62 setSize : function(width, height){
63 if(!this.ignoreResize(width, height)){
65 var size = this.adjustForComponents(width, height);
66 grid.getGridEl().setSize(size.width, size.height);
71 beforeSlide : function(){
72 this.grid.getView().scroller.clip();
75 afterSlide : function(){
76 this.grid.getView().scroller.unclip();
82 Roo.GridPanel.superclass.destroy.call(this);