title: jqGrid addRowData doesn't work with grid as subgrid
body: <p>I want to use a grid as subgrid in jqGrid because I read that "simple subgrid" doesn't allow cell edit.</p>
  
  <p>I'm filling main Grid with dataType function successfully and I'm trying to do the same for subgrid, but subgrid shows without data, and I don't know why because I debugged and I catch data correctly from web service, but when I go through the data doing a addRowData to the subgrid seems to have no effect.</p>
  
  <p>I'm using a a ASP.Net 2.0 web service and JSON,Here is the client code, any idea :-S? Thanks :-)</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I added a:</p>
  
  <pre><code>function ReceivedClientData(data) {
      var thegrid = $("#" + gridId);
      if ($(thegrid).length == 0) alert('NOT EXISTS');
  
      thegrid.clearGridData();
      for (var i = 0; i &lt; data.length; i++)
          thegrid.addRowData(i + 1, data[i]);   
  }
  </code></pre>
  
  <p>And I receive a NOT EXISTS for subgrid, I don't know if is the best way to check if a selector exists but this would mean that I can't find "the dynamic " created by jqgrid when I capture the ajax postback? How can I fill the subgrid?</p>
  
  <p><strong>EDIT 2:</strong></p>
  
  <p>I think that I was wrong with subgrid ID, now I'm saving in a variable the grid_id</p>
  
  <pre><code>subGridRowExpanded: function(subgrid_id, row_id) {
              subGridID = subgrid_id;
  </code></pre>
  
  <p>and using it when callback, but I'm receiving a p.rownumbers is null from jqgrid.js when I try to addRowData. :-S any suggestions?</p>
  
  <pre><code>function ReceivedClientDataForSubGrid(data) {
      var thegrid = $("#" + subGridID);
  
      if ($(thegrid).length == 0) alert('NOT EXISTS');
  
      thegrid.clearGridData();
      for (var i = 0; i &lt; data.length; i++)
          thegrid.addRowData(i + 1, data[i]);
  }
  </code></pre>