title: Issue Reloading DataTables with AJAX Result
body: <p>i am having issue with refreshing DataTable when i reload ajax data on radio button select event ajax result is updated but DataTable shows old Data
  and it shows below message on console - </p>
  
  <pre><code>DataTables warning: table id=sample_1 - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3
  </code></pre>
  
  <p>i googled for this warning but nothing seems helpfull to me. </p>
  
  <p><strong>below is js file i am using</strong> <br>
  <a href="https://www.dropbox.com/s/sgzzl2iup32sq3i/jquery.dataTables.js?dl=0">jquery.dataTables.js</a><br>
  <a href="https://www.dropbox.com/s/l4l7amvghaqje1w/jquery.dataTables.min.js?dl=0">jquery.dataTables.min.js</a><br>
  <a href="https://www.dropbox.com/s/cesyrmv2km8u1hl/table-data.js?dl=0">table-data.js</a></p>
  
  <p><strong>below is my ajax method</strong></p>
  
  <pre><code>$.ajax({
      url: "manual-json.php",
      type: "POST",
      datatype: 'json',
      data: 'jobid=' + $('#jobid').val() + '&amp;matchgroup=' + $('input:radio[name=matchgroup]:checked').val(),
      success: function(result) {
          alert(result);
          var res = "";
          data = $.parseJSON(result);
          for (var key in data) {
              if (data.hasOwnProperty(key)) {
                  if (data[key].matchStatusID == 7) {
                      res = res + "&lt;tr id='tab-row'&gt;&lt;td colspan='4'&gt;&lt;form id='formData" + i + "' onsubmit='formsubmit(this)' method='post' style='margin-bottom: 0;'&gt;&lt;table width='100%'&gt;&lt;tr&gt;&lt;td width='34%'&gt;&lt;input type='hidden' name='manualMatchResoulationDetailID' id='manualMatchResoulationDetailID' value='" + data[key].manualMatchResoulationDetailID + "'&gt;&lt;input type='hidden' name='matchStatusID' id='matchStatusID' value='" + data[key].matchStatusID + "'&gt;&lt;input type='hidden' name='processName" + i + "' id='processName" + i + "' value=''&gt;&lt;input type='hidden' name='id' id='id' value='" + i + "'&gt;&lt;input type='hidden' name='jobid' id='jobid' value='&lt;?php echo $jobid; ?&gt;'&gt;&lt;label id='secondaryData' style='font-size:13px;'&gt;" + data[key].secondaryData + "&lt;/label&gt;&lt;/td&gt;&lt;td width='33%'&gt;&lt;label id='primaryData' style='font-size:13px;'&gt;" + data[key].primaryData + "&lt;/label&gt;&lt;/td&gt;&lt;td width='16%'&gt;&lt;label id='searchScore'  style='font-size:13px;'&gt;" + data[key].searchScore + "&lt;/label&gt;&lt;/td&gt;&lt;td width='17%'&gt;&lt;button class='btn btn-blue' id='change" + i + "' type='button' style='padding: 2 2px;font-size: 13px;margin-right: 5px;margin-left: 10px; width: 58px;' onclick='matchprocess(" + i + ",this.id)'&gt;Change&lt;/button&gt;&lt;button class='btn btn-blue' id='unmatch" + i + "' type='button' style='padding: 2 2px;font-size: 13px;margin-right: 5px;margin-left: 10px; width: 58px;' onclick='matchprocess(" + i + ",this.id)'&gt;Unmatch&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;";
                  } else if (data[key].matchStatusID == 8) {
                      res = res + "&lt;tr id='tab-row'&gt;&lt;td colspan='4'&gt;&lt;form id='formData" + i + "' onsubmit='formsubmit(this)' method='post' style='margin-bottom: 0;'&gt;&lt;table width='100%'&gt;&lt;tr&gt;&lt;td width='34%'&gt;&lt;input type='hidden' name='manualMatchResoulationDetailID' id='manualMatchResoulationDetailID' value='" + data[key].manualMatchResoulationDetailID + "'&gt;&lt;input type='hidden' name='matchStatusID' id='matchStatusID' value='" + data[key].matchStatusID + "'&gt;&lt;input type='hidden' name='processName" + i + "' id='processName" + i + "' value=''&gt;&lt;input type='hidden' name='id' id='id' value='" + i + "'&gt;&lt;input type='hidden' name='jobid' id='jobid' value='&lt;?php echo $jobid; ?&gt;'&gt;&lt;label id='secondaryData' style='font-size:13px;'&gt;" + data[key].secondaryData + "&lt;/label&gt;&lt;/td&gt;&lt;td width='33%'&gt;&lt;label id='primaryData' style='font-size:13px;'&gt;" + data[key].primaryData + "&lt;/label&gt;&lt;/td&gt;&lt;td width='16%'&gt;&lt;label id='searchScore'  style='font-size:13px;'&gt;" + data[key].searchScore + "&lt;/label&gt;&lt;/td&gt;&lt;td width='17%'&gt;&lt;button class='btn btn-blue' id='match" + i + "' type='button' style='padding: 2 2px;font-size: 13px;margin-right: 5px;margin-left: 10px; width: 58px;' onclick='matchprocess(" + i + ",this.id)'&gt;Match&lt;/button&gt;&lt;button class='btn btn-blue' id='unmatch" + i + "' type='button' style='padding: 2 2px;font-size: 13px;margin-right: 5px;margin-left: 10px; width: 58px;' onclick='matchprocess(" + i + ",this.id)'&gt;UnReject&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;";
                  } else {
                      res = res + "&lt;tr id='tab-row'&gt;&lt;td colspan='4'&gt;&lt;form id='formData" + i + "' onsubmit='formsubmit(this)' method='post' style='margin-bottom: 0;'&gt;&lt;table width='100%'&gt;&lt;tr&gt;&lt;td width='34%'&gt;&lt;input type='hidden' name='manualMatchResoulationDetailID' id='manualMatchResoulationDetailID' value='" + data[key].manualMatchResoulationDetailID + "'&gt;&lt;input type='hidden' name='matchStatusID' id='matchStatusID' value='" + data[key].matchStatusID + "'&gt;&lt;input type='hidden' name='processName" + i + "' id='processName" + i + "' value=''&gt;&lt;input type='hidden' name='id' id='id' value='" + i + "'&gt;&lt;input type='hidden' name='jobid' id='jobid' value='&lt;?php echo $jobid; ?&gt;'&gt;&lt;label id='secondaryData' style='font-size:13px;'&gt;" + data[key].secondaryData + "&lt;/label&gt;&lt;/td&gt;&lt;td width='33%'&gt;&lt;label id='primaryData' style='font-size:13px;'&gt;" + data[key].primaryData + "&lt;/label&gt;&lt;/td&gt;&lt;td width='16%'&gt;&lt;label id='searchScore'  style='font-size:13px;'&gt;" + data[key].searchScore + "&lt;/label&gt;&lt;/td&gt;&lt;td width='17%'&gt;&lt;button class='btn btn-blue' id='match" + i + "' type='button' style='padding: 2 2px;font-size: 13px;margin-right: 5px;margin-left: 10px; width: 58px;' onclick='matchprocess(" + i + ",this.id)'&gt;Match&lt;/button&gt;&lt;button class='btn btn-blue' id='reject" + i + "' type='button' style='padding: 2 2px;font-size: 13px;margin-right: 5px;margin-left: 10px; width: 58px;' onclick='matchprocess(" + i + ",this.id)'&gt;Reject&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;";
                  }
                  i = i + 1;
              }
          }
          res = restr + res;
          res = res + '&lt;/tbody&gt;';
          $("#sample_1").append(res);
          TableData.init();
  
      },
      error: function() {
          $("#result").addClass('msg_error');
      }
  });
  </code></pre>