jquery datatable fixed column code example
Example 1: fixed table header datatables
$(document).ready(function() {
var table = $('#myapproval').DataTable( {
"fixedHeader": {
"header": true,
"footer": false
}
}
}
Example 2: datatables column freeze
$(document).ready(function() {
var table = $('#example').DataTable( {
scrollY: "300px",
scrollX: true,
scrollCollapse: true,
paging: false,
fixedColumns: {
leftColumns: 1,
rightColumns: 1
}
} );
} );