title: call datatable on button click
body: <p>I have reached this so far,</p>
  
  <p>my JSON is incompatible with the data table</p>
  
  <p>Error msg, </p>
  
  <blockquote>
    <p>DataTables warning: table id=RegSrc - Requested unknown parameter
    'Filenum' for row 0, column 1</p>
  </blockquote>
  
  <p>Please help </p>
  
  <pre><code> &lt;table id="RegSrc" class="table table-bordered table-striped"&gt;
                                          &lt;thead&gt;
                                              &lt;tr&gt;
                                                  &lt;th&gt;&lt;/th&gt;
                                                  &lt;th&gt;&lt;b&gt;File Number&lt;/b&gt;&lt;/th&gt;
                                                  &lt;th&gt;&lt;b&gt;Patient Name&lt;/b&gt;&lt;/th&gt;
                                                  &lt;th&gt;&lt;b&gt;DOB&lt;/b&gt;&lt;/th&gt;
                                                  &lt;th&gt;&lt;b&gt;Age&lt;/b&gt;&lt;/th&gt;
                                              &lt;/tr&gt;
                                          &lt;/thead&gt;
                                          &lt;tbody&gt;
                                          &lt;/tbody&gt;
                                      &lt;/table&gt;
  </code></pre>
  
  <p>JS code</p>
  
  <pre><code>    var Table = $('#RegSrc').DataTable({
      data: [],
      "columns": [
          {
              "className": 'details-control',
              "orderable": false,
              "data": null,
              "defaultContent": '&lt;i data-toggle class="fa fa-plus-square-o text-primary h5 m-none" style="cursor: pointer;"&gt;&lt;/i&gt;'
          },
          { data: "Filenum" },
          { data: "FullName" },
          { data: "DOB" },
  </code></pre>
  
  <p>"columns": [
              {
                  "className": 'details-control',
                  "orderable": false,
                  "data": null,
                  "defaultContent": ''
              },
              { data: "Filenum" },
              { data: "FullName" },
              { data: "DOB" },
               { data: "Age" }
          ],</p>
  
  <pre><code>    rowCallback: function (row, data) { },
      filter: false,
      info: false,
      ordering: false,
      processing: true,
      retrieve: true
  })
  </code></pre>
  
  <p>Button click function</p>
  
  <pre><code>    $("#srcmdlfrmbtn").on("click", function (event) {
      var obj = {}
      obj.SrchTxt = $('#srctxt').val(),
      obj.FnameSrctxt = $('#fnamesrc').val(),
      obj.SnameSrctxt = $('#snamesrc').val(),
      obj.TnameSrctxt = $('#tnamesrc').val(),
      obj.LnameSrctxt = $('#lnamesrc').val(),
      obj.TelSrcTxt = $('#telsrc').val(),
      obj.SSNSrcTxt = $('#ssnsrc').val(),
      obj.EmailSrctxt = $('#emailsrc').val(),
      obj.DOBSrcTxt = $('#dobsrc').val()
      $.ajax({
          contentType: "application/json; charset=utf-8",
          url: "../CONFIG/WebSerTblsSearch.asmx/SrcTblReg",
          type: "Post",
          data: JSON.stringify(obj),
          dataFilter: function (res) {
              var parsed = JSON.parse(res);
              var morp = JSON.parse(parsed.d);
              console.log(JSON.stringify( morp ))
              //return JSON.stringify({ data: morp });
              Table.clear().draw();
              Table.rows.add(JSON.stringify({ data: morp })).draw();
          },
      })
  
  });
  </code></pre>
  
  <p>My JSON Array results</p>
  
  <pre><code>[{"Filenum":15090248,"FullName":"Ahmad Morsi abdul fattah Abu Maizer","DOB":"05 Dec 2017","Age":0},{"Filenum":170418115,"FullName":"Ahmad Morsi abdul fattah Abu Maizer","DOB":"05 Dec 2017","Age":0},{"Filenum":170418116,"FullName":"Ahmad Morsi abdul fattah Abu Maizer","DOB":"05 Dec 2017","Age":0},{"Filenum":170227111,"FullName":"asd dsf as a","DOB":"27 Feb 2017","Age":0},{"Filenum":15112775,"FullName":"marwam saleh moh saleem","DOB":"26 Nov 2015","Age":2},{"Filenum":15112777,"FullName":"marwam saleh moh saleem","DOB":"26 Nov 2015","Age":2},{"Filenum":15120996,"FullName":"marwam mohmmad  saleem","DOB":null,"Age":null},{"Filenum":160215104,"FullName":"marwam mohmmad abdul fattah Abu Maizer","DOB":"12 Mar 2016","Age":1},{"Filenum":15112270,"FullName":"mohammad j saleh raqaad","DOB":"22 Nov 2015","Age":2},{"Filenum":15112772,"FullName":"salem mohmmad john sarjes","DOB":"22 Oct 2011","Age":6}]
  </code></pre>