AnsweredAssumed Answered

Populate dataGrid with Query Results

Question asked by doncav on Aug 16, 2012
Latest reply on Aug 20, 2012 by doncav
I am trying to populate a dataGrid with results from a query and I've run into an issue.  I have used the sample and have been able to get it to work as a stand alone sample, however that doesn't help with my project.  In my project I am dynamically creating the html table that will be the dataGrid: 
html += '<div id="bufferResultsDiv" data-dojo-type="dijit.layout.ContentPane" class="Pad" style="Display: none;">';
 html += '<table data-dojo-type="dojox.grid.DataGrid" data-dojo-id="grid"  id="grid" data-dojo-props="rowsPerPage:"5", rowSelector:"20px">';
  html += '<thead>';
      html += '<tr>';
          html += '<th field="parcel_f" width="100%">Parcel #</th>';
          html += '<th field="name1" width="100%">Name</th>';
      html += '</tr>';
  html += '</thead>';
 html += '</table>';
html += '</div>';
I get an error saying that .setStore is not a function at this line:
I have tried declare the grid multiple ways:
var grid = dijit.byId('grid');
var grid = dojo.byId('grid');
var grid = $("#grid");

Does anyone have any suggestions on what I can do to populate my dataGrid?