Enable disable fixed column in DataTable using a button
问题 Myself created a html table with fixed columns using jquery DataTable with reference to This example as, $(document).ready(function() { var table = $('#example').DataTable( { scrollY: "300px", scrollX: true, scrollCollapse: true, paging: false } ); new $.fn.dataTable.FixedColumns( table, { leftColumns: 2 } ); } ); UPDATE: Myself trying to enable/disable the fixed column using a button as given in this fiddle as, var columnNumber = 2; $('#ToggleColumns').click(function () { if(columnNumber ==