title: Dojo in domReady callback error
body: <p>I'm new to Dojo. i'm trying to create a layout with the following structure wherein I wanted datagrid to be generated in one of the content pane. But the console shows the error:</p>
  
  <p>' "in domReady callback" "TypeError: undefined is not a function '</p>
  
  <p>can anyone please look into this.</p>
  
  <pre><code>&lt;script&gt;dojoConfig = {async: true, parseOnLoad: false}&lt;/script&gt;
  </code></pre>
  
  
  
  <pre><code>&lt;script&gt;
  require(['dojo/parser', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'dijit/layout/AccordionContainer', 'dijit/TitlePane', 'dijit/form/DropDownButton','dojo/_base/lang', 'dojox/grid/DataGrid', 'dojo/data/ItemFileWriteStore', 'dojo/dom', 'dojo/domReady!'],
  
   function(lang, DataGrid, ItemFileWriteStore, dom){
  
  /*set up data store*/
  var data = {
    identifier: "id",
    items: []
  };
  var data_list = [
    { col1: "normal", col2: false, col3: 'But are not followed by two hexadecimal', col4: 29.91},
    { col1: "important", col2: false, col3: 'Because a % sign always indicates', col4: 9.33},
    { col1: "important", col2: false, col3: 'Signs can be selectively', col4: 19.34}
  ];
  var rows = 60;
  for(var i = 0, l = data_list.length; i &lt; rows; i++){
      data.items.push(lang.mixin({ id: i+1 }, data_list[i%l]));
  }
  var store = new ItemFileWriteStore({data: data});
  
  /*set up layout*/
  var layout = [[
    {'name': 'Column 1', 'field': 'id', 'width': '100px'},
    {'name': 'Column 2', 'field': 'col2', 'width': '100px'},
    {'name': 'Column 3', 'field': 'col3', 'width': '200px'},
    {'name': 'Column 4', 'field': 'col4', 'width': '150px'}
  ]];
  
  /*create a new grid*/
  var grid = new DataGrid({
      id: 'grid',
      store: store,
      structure: layout,
      rowSelector: '20px'});
  
      /*append the new grid to the div*/
      grid.placeAt("gridDiv");
  
      /*Call startup() to render the grid*/
      grid.startup();
  </code></pre>
  
  <p>});
      </p>
  
  <pre><code>&lt;body class="soria"&gt;
  &lt;div data-dojo-type='dijit/layout/BorderContainer' style="width:100%; height:31px;"&gt;
  
  
  &lt;div data-dojo-attach-point="titleBar" class="dijitDialogTitleBar" title="My Dialog Title"&gt;
  &lt;span data-dojo-attach-point="titleNode" class="dijitDialogTitle" id="dialogOne_title"&gt;My Dialog Title&lt;/span&gt;   
  &lt;/div&gt;
  
  
  
  
  &lt;/div&gt;
  
  
  &lt;div data-dojo-type='dijit/layout/BorderContainer' style="width:100%; height:60px;" &gt;
  
  
  &lt;div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"&gt;
  &lt;div data-dojo-type="dijit/form/DropDownButton"&gt;
  &lt;span&gt;Register&lt;/span&gt;
  
  &lt;div class="buttonDropDown"&gt;
   &lt;button data-dojo-type="dijit/form/Button" type="submit"&gt;Apply&lt;/button&gt;
   &lt;button data-dojo-type="dijit/form/Button" type="submit"&gt;Cancel&lt;/button&gt;
   &lt;button data-dojo-type="dijit/form/Button" type="submit"&gt;Save &amp; Exit&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;  
  &lt;/div&gt;
  
  
  &lt;/div&gt;
  
  &lt;div data-dojo-type="dijit/layout/BorderContainer" style="width:100%;overflow:hidden; height:100%; background-color:#ccc;"&gt;
  
  &lt;div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'leading'"&gt;
  
  &lt;div data-dojo-type="dijit/layout/AccordionContainer" style="width:300px;" class="Accordion"&gt;
  
  &lt;div data-dojo-type="dijit/layout/ContentPane" title="Folders"&gt; 
  &lt;/div&gt;
  
  &lt;div data-dojo-type="dijit/layout/ContentPane" title="Search Messages"&gt; 
  &lt;/div&gt;
  
  &lt;div data-dojo-type="dijit/layout/ContentPane" title="Contacts"&gt; 
  &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"&gt;
  
  
  &lt;div data-dojo-type="dijit/layout/BorderContainer"  id="rightBorderCon"&gt;
  
  &lt;div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter: true, region: 'center'"&gt;
  
  &lt;div id="tp1" data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Title Pane'" class="titlePane"&gt;
  
  &lt;p&gt;Dojo is a JavaScript framework targeting the many needs of large-scale client-side web development. For example, Dojo abstracts the differences among diverse browsers to provide APIs that will work on all of them (it can even run on the server under Node.js); it establishes a framework for defining modules of code and managing their interdependencies; it provides build tools for optimizing JavaScript and CSS, generating documentation, and unit testing; it supports internationalization, localization, and accessibility; and it provides a rich suite of commonly needed utility classes and user-interface widgets.&lt;p&gt;
  
  &lt;/div&gt;
  
  
  &lt;div id="tp2" data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Title Pane'" class="titlePane"&gt;
  
  &lt;p&gt;Dojo is a JavaScript framework targeting the many needs of large-scale client-side web development. For example, Dojo abstracts the differences among diverse browsers to provide APIs that will work on all of them (it can even run on the server under Node.js); it establishes a framework for defining modules of code and managing their interdependencies; it provides build tools for optimizing JavaScript and CSS, generating documentation, and unit testing; it supports internationalization, localization, and accessibility; and it provides a rich suite of commonly needed utility classes and user-interface widgets.&lt;p&gt;
  
  &lt;/div&gt;
  
  
  &lt;div id="tp3" data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Title Pane'" class="titlePane"&gt;
  
  &lt;p&gt;Dojo is a JavaScript framework targeting the many needs of large-scale client-side web development. For example, Dojo abstracts the differences among diverse browsers to provide APIs that will work on all of them (it can even run on the server under Node.js); it establishes a framework for defining modules of code and managing their interdependencies; it provides build tools for optimizing JavaScript and CSS, generating documentation, and unit testing; it supports internationalization, localization, and accessibility; and it provides a rich suite of commonly needed utility classes and user-interface widgets.&lt;p&gt;
  
  &lt;/div&gt;
  
  
  &lt;div id="tp4" data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Title Pane'" class="titlePane"&gt;
  
  &lt;p&gt;Dojo is a JavaScript framework targeting the many needs of large-scale client-side web development. For example, Dojo abstracts the differences among diverse browsers to provide APIs that will work on all of them (it can even run on the server under Node.js); it establishes a framework for defining modules of code and managing their interdependencies; it provides build tools for optimizing JavaScript and CSS, generating documentation, and unit testing; it supports internationalization, localization, and accessibility; and it provides a rich suite of commonly needed utility classes and user-interface widgets.&lt;p&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter: true, region: 'bottom'" style="height:215px"&gt;
  &lt;div id="gridDiv"&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;/div&gt;
  
  &lt;/div&gt;
  
  
  
  
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>