var table = $(table_name).DataTable({ "scrollX": true, "scrollY": "400px", fixedHeader: true, displayStart: displayStart, searchHighlight: true, order: [], columnDefs: columnDefs, "sDom": 'lBfrt', "responsive": true, buttons: [ { extend: 'excelHtml5', className: 'btn btn-secondary red-button1', text: '', titleAttr: obj.pageName, title: "" }], stateSave: false, serverSide: true, searching: true, scrollCollapse: true, fixedColumns: { leftColumns: leftColumn }, pageLength: pageLength, ajax: { url: obj.url, data: obj.data, type: 'post', processing: true, }, ordering: false, columns: columnvalue, drawCallback: function () { $('.dataTables_paginate.paging_simple_numbers').removeClass('hidden'); $('.paginate_button.next').removeClass('disabled'); if (table.data().count() < 100) { $('.paginate_button.next').addClass('disabled'); } removeLoader("tableContainer"); setTimeout(function () { addTableExtraEvents() }, 500); } }); if (table) { $('#table1_filter label input[type="search"]').unbind(); $('#table1_filter label input[type="search"]').keyup(function (e) { if (e.keyCode === 13) { table.on('preXhr.dt', function (e, settings, data) { data.start = 0; }); table.search(this.value).draw(); } }); }