Sorting problem with > 28 columns
Sorting problem with > 28 columns
I may just be missing something simple, everything works great until I add the 29th column. I can still filter and paginate without issue, the sorting just stops functioning. I did not make any changes to the ordering section of the php script. If anyone has run into this in the past, or if I missed it in my search on sorting in the forum and could post a link it would be much appreciated!
I only have 6 visible columns, but I wanted to pass all of them across for some ajax forms. Setting everything but the 6 to "bSorted": false didn't make a difference either.
jquery-1.5 / dataTables 1.7.5
I only have 6 visible columns, but I wanted to pass all of them across for some ajax forms. Setting everything but the 6 to "bSorted": false didn't make a difference either.
jquery-1.5 / dataTables 1.7.5
This discussion has been closed.
Replies
oTable = $('#table').dataTable( {
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"iDisplayLength": 50,
"aLengthMenu": [[50, 100, 150, -1], [50, 100, 150, "All"]],
"sPaginationType": "full_numbers",
"aaSorting": [[ 5, "desc" ]],
"aoColumns": [
/* pkey */ { "bVisible": false },
/* version */ { "bVisible": false },
/* sysdate */ { "bVisible": false },
/* brief */ null,
/* prepared */ { "bVisible": false },
/* startdate */ null,
/* starttime */ null,
/* endtime */ null,
/* primarycontact */ null,
/* pphone */ { "bVisible": false },
/* pemail */ { "bVisible": false },
/* secondary */ { "bVisible": false },
/* sphone */ { "bVisible": false },
/* semail */ { "bVisible": false },
/* vendor */ { "bVisible": false },
/* vphone */ { "bVisible": false },
/* vemail */ { "bVisible": false },
/* status */ null,
/* approved */ { "bVisible": false },
/* engapproved */ { "bVisible": false },
/* appdate */ { "bVisible": false },
/* emergency */ { "bVisible": false },
/* intended */ { "bVisible": false },
/* effect */ { "bVisible": false },
/* statement */ { "bVisible": false },
/* estimate */ { "bVisible": false },
/* risk */ { "bVisible": false },
/* procedurefield */ { "bVisible": false }
/* verification */ { "bVisible": false }
],
"sAjaxSource": "php/table.php"
});
[/code]
Thanks,
Allan
One possibility that springs to mind is the size of the GET URL. By default DataTables uses HTTP GET for the Ajax request for data (this can be overridden with fnServerData) - and servers are configured with a maximum URL request length. It could be that the first server was just at the limit with 28 columns, and 29 pushed it over the end - while the second server is configured slightly differently. A look at the server error log would confirm if this is the case. If it is an issue, using POST would fix it.
Allan