title: How can I pass a html table row into DataTable.net fnAddData
body: <p>I am using the DataTable.net plugin and I am wondering how can I add dynamically a row to a existing table?</p>
  
  <p><a href="http://datatables.net/examples/api/add_row.html" rel="noreferrer">http://datatables.net/examples/api/add_row.html</a></p>
  
  <p>I am looking at this example and they have it like this</p>
  
  <pre><code>/* Global variable for the DataTables object */
  var oTable;
  
  /* Global var for counter */
  var giCount = 2;
  
  $(document).ready(function() {
      oTable = $('#example').dataTable();
  } );
  
  function fnClickAddRow() {
      oTable.fnAddData( [
          giCount+".1",
          giCount+".2",
          giCount+".3",
          giCount+".4" ] );
  
      giCount++;
  }
  </code></pre>
  
  <p>but I am wondering what happens if I want I have a table row already rendered?</p>
  
  <p>Say this is my table.</p>
  
  <pre><code>&lt;table border="1"&gt;
  &lt;tr&gt;
  &lt;td&gt;row 1, cell 1&lt;/td&gt;
  &lt;td&gt;row 1, cell 2&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;row 2, cell 1&lt;/td&gt;
  &lt;td&gt;row 2, cell 2&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt; 
  </code></pre>
  
  <p>Now I have this </p>
  
  <pre><code>var newRow = '&lt;tr&gt;&lt;td&gt;row 3, cell 1&lt;/td&gt;&lt;td&gt;row 3, cell 2&lt;/td&gt;&lt;/tr&gt;';
  </code></pre>
  
  <p>How can I add it through addRow?</p>
  
  <p>I tried   <code>oTable.fnAddData(newRow);</code> but that seems not to work.</p>
  
  <p>So I am not sure how to do this.</p>