zafiro
6 Jul 2007, 12:33 PM
I used the complex layout example as a base for my program. I created a grid inside a NestedLayoutContainer at the west region. However, the code became so big that I tried to move the definitions of the panels out from init (and still inside Example).
var Example = function(){
var layout;
var refPags=false;
var refAreas=false;
var Sitios = function(){
var ds = new Ext.data.Store({ ... });
ds.load();
var colModel = new Ext.grid.ColumnModel([...]);
var grid_sites = new Ext.grid.Grid('grid-sitios', {ds: ds, cm: colModel});
And it breaks when trying to create the grid.
Firebug shows:
this.container has no properties
Ext.grid.Grid=function(_1,_2){this.container=Ext.get(_1);this.container.update("...
However, if I move 'Sitios' definition inside of init, there is no problem. I suppose
Ext.EventManager.onDocumentReady(Example.init, Example, true); is setting something in the scope that the grid uses... in it gets set only for Example.init What is it? What does the grid require?
var Example = function(){
var layout;
var refPags=false;
var refAreas=false;
var Sitios = function(){
var ds = new Ext.data.Store({ ... });
ds.load();
var colModel = new Ext.grid.ColumnModel([...]);
var grid_sites = new Ext.grid.Grid('grid-sitios', {ds: ds, cm: colModel});
And it breaks when trying to create the grid.
Firebug shows:
this.container has no properties
Ext.grid.Grid=function(_1,_2){this.container=Ext.get(_1);this.container.update("...
However, if I move 'Sitios' definition inside of init, there is no problem. I suppose
Ext.EventManager.onDocumentReady(Example.init, Example, true); is setting something in the scope that the grid uses... in it gets set only for Example.init What is it? What does the grid require?