How to implement a check all functionality in data table with server side pagination?

How to implement a check all functionality in data table with server side pagination?

thariqthariq Posts: 1Questions: 1Answers: 0
edited November 2015 in Free community support

How to implement a check all functionality in data table with server side pagination?

     <table id="example" >
     <thead>
      <tr>
           <th >User Name</th>
           <th>Region</th>
            <th>Country</th>
            <th><input type="checkbox" id="checkAll" /> Delete</th>
       </tr>
      </thead>
        <tbody>
    </tbody>
   </table>

here in final column each row contains a check box and while clicking on the header check all, it should select all the below check boxes and should preserve it, in the sense, if i go to the next page and come back or do a sorting etc the checked rows should remain checked. Is there a way to do this?
note:- i am using server side pagination
here is the data table initialization

 var table = $('#example').dataTable({
          
            "sAjaxDataProp": "dataVO",
            "bServerSide" : true,
            "bProcessing" : true,
            "sAjaxSource" :dataurl,
             "sPaginationType" : "full_numbers", 
             "aoColumns": [
                              
                             
                              { "mData": "userName" },
                              { "mData": "region" },
                              { "mData": "country" },
                              { "mData": "deleteColomn" }
                              
                              ],
 "aoColumnDefs": [
                           { "bSortable": false, "aTargets": [3 ] }
                         ] 
       
       });

where deleteColomn returns

<input type='checkbox'  value='some value' class='delete_user'/>
This discussion has been closed.