Datatables warning: request unknown parameter |
Newbie to CI, needs help
Here's my controller code: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); here's my documents views Code: <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/t/bs/dt-1.10.11/datatables.min.css"/> When I click the warning several times (as many as the results are) the results are shown apart from the first column. I even changed the default NULL values to None, but nothing happened. Can someone help?
SAME ISSUE .
After page loading pop display with DataTables warning: table id=example - Requested unknown parameter '3' for row 50. how to resolve this ?
Did you read this and debug your code?
Warning: Requested unknown What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
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 }], |
Welcome Guest, Not a member yet? Register Sign In |