title: adding button to dojo datagrid
body: <p>I am trying to add a delete button to the Dojo Datagrid and I currently have the following javascript:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>function createGrid() {
      gridTmp = new dojox.grid.DataGrid({
          store: jsonStore,
          structure: [ 
              {name: "Report No", field:"inc_number"},
              {name: "Incident Date", field: "IncidentDate"},
              {name: "Report Date", field: "reportDate"},
              {name: "Location", field: "location"},
              {name: "Delete", field: "inc_number", formatter: getDelete}
          ],
          noDataMessage: 'No results returned'
      }, "grids");
  
      return gridTmp;
  }
  dojo.addOnLoad(function() {
      grid = createGrid();
      grid.startup();
  });
  
  function getDelete(item) {
     return "&lt;button onclick=\"location.href='/report?command=delete&amp;reportNo="
             + store.getIdentity(item) + "'\"&gt;Delete&lt;/button&gt;";
  }
  </code></pre>
  
  <p>Whenever I load the page I only get an empty grid with a message "sorry an error occurred."  If I remove the last field with the "getDelete" formatter, the datagrid populates just fine.  I am not sure what I am doing wrong so any help would be appreciated.</p>