I have a very basic ASP.NET MVC app using JQuery Datatables and when I use more that 8 columns i got an http://datatables.net/tn/7 error. If I just then remove any column it works
<script type="text/javascript">
var NoegleListe;
$(function () {
NoegleListe = {
dt: null,
init: function () {
dt = $('#noegler-data-table').DataTable({
"stateSave": true,
stateLoadParams: function (settings, data) {
var api = new $.fn.dataTable.Api(settings);
var info = api.page.info();
if (data.start > info.pages) {
data.start = 1; // or (info.pages) for last page
}
},
"language": {
"lengthMenu": "Vis _MENU_ nøgler per side",
"zeroRecords": "Nothing found - sorry",
"info": "Viser side _PAGE_ af _PAGES_",
"infoEmpty": "No records available",
"infoFiltered": "(filtreret fra _MAX_ nøgler)",
"search": "Søg",
},
"serverSide": true,
"Processing": true,
"ajax": {
"url": "@Url.Action("Get", "Noegler")" },
"columns": [
{ "data": "firma", "searchable": false, "orderable": false },
{ "data": "noeglemodel", "searchable": false, "orderable": false },
{ "data": "noegletype", "searchable": false, "orderable": false },
{ "data": "systemnr", "searchable": false, "orderable": false },
{ "data": "markering", "searchable": false, "orderable": false },
{ "data": "kode", "searchable": false, "orderable": false },
{ "data": "sidekode", "searchable": false, "orderable": false },
{ "data": "dlf", "searchable": false, "orderable": false },
{ "data": "dlf", "searchable": false, "orderable": false },
],
"order": [[0, "asc"]],
"lengthMenu": [[8, 25], [8, 25]]
});
}
}
// initialize the datatables
NoegleListe.init();
});
</script>