• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Datatables warning: request unknown parameter

#4
When you define database use column number of table.

<script type="text/javascript">
$(function(){
var table = $('#sample_3');

// begin first table
table.dataTable({

// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing1 _START_ to _END_ of _TOTAL_ entries1",
"infoEmpty": "No entries found",
"infoFiltered": "(filtered1 from _MAX_ total entries)",
"lengthMenu": "Show _MENU_ entries",
"search": "Search:",
"zeroRecords": "No matching records found"
},

"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.

"columns": [{
"orderable": false
}, {
"orderable": true
},{
"orderable": true
},{
"orderable": true
},
"orderable": true
}, {
"orderable": false
}],
"lengthMenu": [
[5, 15, 20, 100, -1],
[5, 15, 20, 100, "All"] // change per page values here
],
// set the initial value
"pageLength": 5,
"pagingType": "bootstrap_full_number",
"language": {
"search": "Search Anything: ",
"lengthMenu": " _MENU_ records",
"paginate": {
"previous":"Prev",
"next": "Next",
"last": "Last",
"first": "First"
}
},
"columnDefs": [{ // set default column settings
'orderable': false,
'targets': [0]
}, {
"searchable": false,
"targets": [0]
}],
"order": [
[1, "desc"]
] // set first column as a default sort by asc
});
});
</script>


Your order-able column incorrect
"columns": [{
"orderable": false
}, {
"orderable": true
},{
"orderable": true
},{
"orderable": true
},
"orderable": true
}, {
"orderable": false
}],
Reply


Messages In This Thread
RE: Datatables warning: request unknown parameter - by XtreemDeveloper - 01-22-2018, 06:25 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.