title: SlickGrid requires a valid container, #myGrid does not exist in the DOM
body: <p>I've been trying to use SlickGrid Dataview with Json but to no avail. I keep getting the above error. "JavaScript runtime error: SlickGrid requires a valid container, #myGrid does not exist in the DOM."</p>
  
  
  
  <pre><code>&lt;div id="myGrid" style="width:100%;height:500px;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And this is the script file to load <code>json</code>:</p>
  
  <pre><code>var dataView = new Slick.Data.DataView();
  var grid = new Slick.Grid("#myGrid", dataView, columns, options);
  
   //sample data
   var columns = [{
       id: "CodeID",
       name: "CodeID",
       field: "CodeID",
       width: 50
   },
   {
       id: "Name",
       name: "Name",
       field: "Name",
       width: 200
   },
   width: 100
   }
   ];
   var options = {
       enableColumnReorder: false,
       multiColumnSort: true
   };
   // wire up model events to drive the grid
   dataView.onRowCountChanged.subscribe(function(e, args) {
       grid.updateRowCount();
       grid.render();
   });
  
   dataView.onRowsChanged.subscribe(function(e, args) {
       grid.invalidateRows(args.rows);
       grid.render();
   });
  
  
   $.getJSON(my_url, function(data) {
       dataView.beginUpdate();
       dataView.setItems(data);
       dataView.endUpdate();
  
   });
  </code></pre>
  
  <hr>
  
  <p>If I don't use dataview and iterate throught json data and pass it to the grid everything works fine but when I use dataview I get the error above even though I have a div with Id="myGrid".</p>
  
  <p>I would appreciate any help. </p>
  
  <p>Thanks</p>