title: Access ExtJS grid's column model from other file
body: <p>I have an ExtJS grid that has a button set up in it. The button triggers a function that's defined into other JS file that's included in the grid page. The function triggers ok but in that function I want to get the columns count like this:</p>
  
  <pre><code>grid.getColumnModel().getColumnCount()
  </code></pre>
  
  <p>The problem is that I get an error like: grid.getColumnModel is not a function.</p>
  
  <p>In PHP I would make a "global $ext" and then access that function. How can I do this in Ext ? How can I access the grid from other file ? What needs to be defined ?</p>
  
  <p>Thank you.</p>