title: How to update all data in jQuery.dataTables with client-side data?
body: <p>I've been fruitlessly been trying to get jQuery.dataTables to allow me to update the data in the table using Javascript.  I know this has been discussed on SO before, but I haven't been able to make any of the solutions I've seen work.</p>
  
  <p>I have a parameter called <code>data</code> that represents the data to display in the table.  It is passed into a function.</p>
  
  <p>I would have thought that the way to update the data would be like this:</p>
  
  <pre><code>// I checked that the new data is returned by $table.data() afterwards    
  $table.data(data); 
  // Now that the data is updated, redraw the table.
  $table.fnDraw();
  </code></pre>
  
  <p>Nothing seems to happen when the above code runs.  What am I doing wrong?</p>
  
  <p>I have no trouble using fnUpdate to update the data in individual rows, so I find this particularly perplexing.</p>
  
  <p><b>Update:</b> After giving this some more careful research, I found that I can almost achieve the desired result by doing the following:</p>
  
  <pre><code>$table.fnClearTable();                            
  $table.fnAddData(data);                            
  $table.fnDraw();   
  </code></pre>
  
  <p>However, the problem with the above is that the user loses his place in the pagination and has to navigate back to the page he was on.</p>