title: jqGrid not displaying JSON data
body: <p>I'm using asp.net mvc to create a webpage that renders a jqGrid for data in my azure table. The grid will callback into my controller and using the debugger, I can visually verify data is being generated correctly. The issue is that once the data is returned as a JSON string, the jqGrid throws this error:</p>
  
  <pre><code>b.jgrid.getAccessor(p, d.cell) is undefined
  http://localhost:54758/jquery.jqGrid.min.js
  Line 65
  </code></pre>
  
  <p>I've looked online for documentation but have been unsuccessful in returning anything except what appears to be repository snapshots. I've stripped down my code to only have one column of data (shown below) returned as a string and still nothing. </p>
  
  <p>If I add the line "datatype: 'local'," to my jqGrid options, the error isn't thrown. However, data is still not being rendered either. None of the other questions suggested in "Similar Questions" solved my issue. The data is just an Id field and is a simple C# string. </p>
  
  <p>Below is the aspx file contents used to render the jqGrid:</p>
  
  <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server"&gt;  
  &lt;%--Must load language tag BEFORE script tag--%&gt;
  &lt;script src="grid.locale-en.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="jquery.jqGrid.min.js" type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      jQuery(document).ready(function () {
          jQuery("#list").jqGrid({
              autowidth: true,
              url: '/HouseData/GridData/',
              datatype: 'local',  &lt;---instead of 'local' I also tried 'jsonstring'
              mtype: 'POST',
              colNames: ['House Name'],
              colModel: [
                  { name: 'houseName', index: 'houseName', key: true, width: 80, align: 'right', hidden: false }],
  
              pager: jQuery('#pager'),
              rowNum: 20,
              rowList: [5, 10, 20, 50],
              sortname: 'houseName',
              sortorder: "desc",
              height: 400,
              viewrecords: true,
              imgpath: ''
         });
      });
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"&gt;
  &lt;div id="main"&gt;
      &lt;h2&gt;&lt;a href="#"&gt;Show House Name&lt;/a&gt;&lt;/h2&gt; 
      &lt;div class="disignBoxFirst"&gt;
          &lt;div class="boxContent"&gt;
                  &lt;%: Html.Partial("HouseDataSearch") %&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;hr /&gt;
      &lt;table id="list" class="scroll" cellpadding="0" cellspacing="0"&gt;&lt;/table&gt;
      &lt;div id="pager" class="scroll" style="text-align:center;"&gt;&lt;/div&gt; 
  &lt;/div&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>The function used to compose the json string, contained in the C# file "HouseDataController.cs", is below (initially I didn't have the "datatype" option in the aspx file shown above for the jqGrid):</p>
  
  <pre><code>public JsonResult GridData(string sidx, string sord, int page, int rows, string houseName)
      {            
          //Setup values to return to the view for display of user entered values            
          ViewData["HouseName"] = houseName;
  
  
          //Get table data
          CloudStorageAccount storageAccount = CloudStorageAccount.FromConfigurationSetting("ConnectionString");
          ReportStorageDataServiceContext storageContext = new ReportStorageDataServiceContext(storageAccount.TableEndpoint.ToString(), storageAccount.Credentials);
  
          int houseCount = 0;
          IQueryable&lt;HouseDataModel&gt; houses = storageContext.CreateQuery&lt;HouseDataModel&gt;("HouseDataTable").Where(h =&gt; h.isAvailable == true);
          List&lt;HouseDataModel&gt; queryDetails = new List&lt;HouseDataModel&gt;();
          foreach (HouseDataModel house in houses)
          {
              queryDetails.Add(house);
              houseCount++;
          }
  
          //Figure out paging
          int pageIndex = Convert.ToInt32(page) - 1;
          int pageSize = rows;
          int totalRecords = houseCount;
          int totalPages = (int)Math.Ceiling((float)totalRecords / (float)pageSize);
  
          var jsonData = new
          {
              total = totalPages,
              page,
              records = totalRecords,
              rows = (from house in queryDetails select new { User = house.houseName }).ToArray()
          };
  
          return Json(jsonData);
      }
  </code></pre>
  
  <p>The error message was caught using Firebug. If this is not specific/detailed enough or if it was resolved in another thread please advise. </p>
  
  <p>Thanks!</p>