$('#TableId').DataTable( { "bPaginate": true, "pageLength": myValue2, "order": [[ 1, "EmailAddress" ]], "lengthChange": true, "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]], "columnDefs": [ { "width": "5%", "targets": [0] }, { "className": "text-left custom-middle-align", "targets": [0, 1, 2, 3, 4, 5, 6, 7] }, { "targets": [0, 1, 2, 3, 4, 5], "visible": "true" }, { "targets": [6, 7], "visible": "false"}, ], "language": { "processing": "
" }, "processing": "true", "serverSide": "true", "responsive": "true", "ajax": { "url": "../XUserList/GetUserList?VT=Mortgage", "contentType": "application/json", "type": "GET", "dataType": "JSON", "data": function (d) { return d; }, "dataSrc": function (json) { json.draw = json.data.draw; json.recordsTotal = json.data.recordsTotal; json.recordsFiltered = json.data.recordsFiltered; json.data = json.data.data; var return_data = json; return return_data.data; } }, "columns": [ { "data": null, "render": function(data, type, full) { return ""; } }, { "data": "EmailAddress" }, { "data": "Enabled" }, { "data": "Profile" }, { "data": "Role" }, { "data": "LastLogon" }, { "data": "Logons" }, { "data": "ReportRules" } ], dom: 'Blfrtip', "search": { 'search': sSrchTxt1 }, buttons: [ 'copyHtml5', { extend: 'excelHtml5', title: 'ExcelExport' }, { extend: 'csvHtml5', title: 'CSVExport' }, { extend: 'pdfHtml5', title: 'PDFExport' }, 'print' ] }); });