Answers for "datatables select hidden column"

2

hide datatable columns using datatable predifine function

$(document).ready(function() {
    $('#example').DataTable( {
        "columnDefs": [ 
            {
                "targets": [ 2 ],
                "visible": false,
                "searchable": false
            },
            {
                "targets": [ 3 ],
                "visible": false
            }
        ]
    } );
} );
Posted by: Guest on May-24-2021
0

datatables hide showing entries

// pre v1.10
   $('#example').dataTable({
       bInfo : false
   });
   
   // v1.10+
   $('#example').DataTable({
       info : false
   });
Posted by: Guest on February-10-2021
0

Datatable hide columns

"columnDefs": [
            {
                "targets": [1,2],
                "visible": false,
                "searchable": false
            }
        ]
Posted by: Guest on October-07-2021

Browse Popular Code Answers by Language