title: jqGrid addRowData - how to add custom name/id to each row?
body: <p>I'm just starting out with jqGrid, so sorry if this is an obvious question (though I couldn't find the answer on their website anywhere).</p>
  
  <p>I'm using the following method to add row data to my grid currently:</p>
  
  <pre><code>for (var i = 0; i &lt;= mydata.length; i++) {
      jQuery("#grid2").jqGrid('addRowData', i + 1, attributes[i]);
  }
  </code></pre>
  
  <p>And the resulting HTML is this:</p>
  
  <pre><code>&lt;tr class="ui-widget-content jqgrow ui-row-ltr" tabindex="-1" id="1" role="row"&gt; ... &lt;/tr&gt;
  </code></pre>
  
  <p>The id is currently based on the row number, but I would like to change the id to a custom definition, based on a variable in my mydata array.</p>
  
  <p>For example, if my mydata array was so:</p>
  
  <pre><code>var mydata = [ { id="1", name="someName", type="typeOne" } ]
  </code></pre>
  
  <p>I would want my HTML output to look like this:</p>
  
  <pre><code>&lt;tr class="..." id="typeOne"&gt; &lt;/tr&gt;
  </code></pre>
  
  <p>OR </p>
  
  <pre><code>&lt;tr class="..." id="rowid" name="typeOne"&gt; &lt;/tr&gt;
  </code></pre>
  
  <p>How do I go about making sure addRowData method adds a custom id to my rows instead of the regular rowid?</p>