title: data table search is not working on ajax call data
body: <p>I have a jsp clientprice.jsp in which there is a datatable in which data is loaded on select box dynamically by ajax call. Data is shown in datatable but search is not working.
  I included my jsp as well ajax code here -</p>
  
  <pre><code>function getTestsByClient(clientId,tableId) {
  $.ajax({
      url : "/corelims/rest/data/get/tests/by/client/" + clientId,
      type : 'GET',
      dataType : "json",
      complete : function(data, textStatus, $XHR) {
          afterAjaxCall($XHR,textStatus);
          arrayData = JSON.parse(data.responseText);
          htmltd = "";
          var i=0;
  
          var carr = ["class1","class2","class3","class4","class5","class6"];
  
          for (var i = 0; i &lt; arrayData.length; i++) {
  
              jsonObj = arrayData[i];
              htmltd+="&lt;tr id='tr"+i+"' class='' &gt;";
  
          var j = 0;
          var v = "tr"+i;
          var func = "activateTestPriceChangeClass('"+v+"')";
          for ( var key in jsonObj) {
              if(j&lt;3){
                  htmltd += "&lt;td  id=td"+(i)+" class='core-td'&gt;&lt;input type='text' class='core-input "+carr[j-1]+"' id="+key+(i)+" name="+key+(i)+" value="+jsonObj[key]+" onchange="+func+" readonly='readonly'&gt;&lt;/td&gt;";
              }
              else{
                  htmltd += "&lt;td  id=td"+(i)+" class='core-td'&gt;&lt;input type='text' class='core-input "+carr[j-1]+"' id="+key+(i)+" name="+key+(i)+" value="+jsonObj[key]+" onchange="+func+" &gt;&lt;/td&gt;";
              }
              j++;
          }
          i+1;
          htmltd+='&lt;/tr&gt;'
          }
          $("#"+tableId).html(htmltd);
      }
  });
   }
  </code></pre>
  
  <p>html code -</p>
  
  <pre><code> &lt;table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered datatables" id="client_price"&gt;
                              &lt;thead&gt;
                                  &lt;tr&gt;
                                      &lt;th&gt;Test Code&lt;/th&gt;
                                      &lt;th&gt;Test Name&lt;/th&gt;
                                      &lt;th&gt;CORE MRP&lt;/th&gt;
                                      &lt;th&gt;Top Level Discount&lt;/th&gt;
                                      &lt;th&gt;MRP Discount&lt;/th&gt;
                                      &lt;th&gt;Net Amount&lt;/th&gt;
                                  &lt;/tr&gt;
                              &lt;/thead&gt;
                              &lt;tbody id ="testBody"&gt;
                                  &lt;tr class="odd gradeX"&gt;
                                      &lt;td&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;/tbody&gt; 
                          &lt;/table&gt;
  </code></pre>