title: changing a dojo datagrids structure dynamically
body: <p>I am having trouble attempting to change the structure of a datagrid after new information is received. I need to be able to change the number of columns everytime a query is made.</p>
  
  <p>The javascript code I use to create the grid</p>
  
  <pre><code>function setgrid(){
      var gridLayout = [];
      var key, i;
      for(i = 0; i &lt; 10; i++) {
          key = i + "";
          gridLayout.push({
              field: key, 
              name: key,
              editable: false
          });                       
      }
  
      // create a new grid:
      billsGrid = new dojox.grid.DataGrid({
          query: {},
          //store: store,
          clientSort: true,
          rowSelector: '20px',
          structure: gridLayout,
          columnReordering: true
      }, gridContainer);
  
      // Call startup, in order to render the grid:
      billsGrid.startup();
  }
  </code></pre>
  
  <p>and the html:</p>
  
  <pre><code>&lt;div id="gridContainer" style="width: 650px; height: 600px; border: 1px solid silver;" /&gt;
  </code></pre>
  
  <p>How would I change the grid to have a new layout of say 5 columns?</p>