title: add checkbox to datatable while loading data from database using ajax
body: <p>I can't add checkbox to my DataTable while bind data from db using ajax. How can I add a checkbox with server-side data loading?</p>
  
  <p>My jQuery:</p>
  
  <pre><code>var table = $('#example').DataTable({
          "ajax": "getBusperOrder.php",
          "bPaginate": true,
          "retrieve": true,
          "bProcessing": true,
          "pageLength": 10,
          "columns": [{
                  mData: 'district'
              }, {
                  mData: 'deponame'
              }, {
                  mData: 'busname'
              }, {
                  mData: 'bonnetnumber'
              }, {
                  mData: 'routename'
              }, {
                  mData: 'bustype'
              }, {
                  mData: 'status'
              }
          ],
      });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;table id="example"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;District&lt;/th&gt;
              &lt;th&gt;Depo Name&lt;/th&gt;
              &lt;th&gt;Bus Number&lt;/th&gt;
              &lt;th&gt;Bonnet Number&lt;/th&gt;
              &lt;th&gt;Route Name&lt;/th&gt;
              &lt;th&gt;Bus Type&lt;/th&gt;
              &lt;th&gt;Action&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>gerBusperOrder.php</p>
  
  <pre><code>&lt;?php
  require('database/db.php');
  $sql = "select * from bus as B left join depo as D on B.depoid=D.depoid left join district as DS on D.district=DS.id left join bustype as BS on B.bustypeid=BS.bustypeid left join route as R on B.routeid=R.routeid LEFT JOIN bustype as BT on B.bustypeid=BT.bustypeid WHERE B.busid IN(SELECT busid from bus where busid NOT IN (SELECT DISTINCT(bus_id) from advt_book_side AS ABS INNER JOIN booking as B on ABS.booking_number=B.bookingnumber WHERE B.todate&gt;CURDATE() GROUP BY bus_id HAVING COUNT(sides_id)=4))";
  $resultset = mysqli_query($db, $sql) or die("database error:" . mysqli_error($db));
  $data = array();
  while ($rows = mysqli_fetch_assoc($resultset)) {
      $data[] = $rows;
  }
  $results = array(
      "sEcho" =&gt; 1,
      "iTotalRecords" =&gt; count($data),
      "iTotalDisplayRecords" =&gt; count($data),
      "aaData" =&gt; $data
  );
  echo json_encode($results);
  ?&gt;
  </code></pre>
  
  <p>I need to add a checkbox on the first column of each td with id</p>