Multiple Column Sorting not working

Multiple Column Sorting not working

pfiorellapfiorella Posts: 8Questions: 2Answers: 0
edited April 2014 in General
I'm trying to set the initial display of my table to sort 3 columns (the 7th, 4th, and 0th column). I'm trying to use aaSorting to no avail. Here's the code I'm using.

[code]
$(document).ready(function () {
$('#tblProjects').dataTable({
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"bPaginate": true,
"aaSorting": [[7, 'asc'], [4, 'asc'], [0, 'desc']],
"iDisplayLength": 100
});
[/code]

As far as I can tell it is only sorting the 4th column, and no others. Am I doing something wrong? I can get it to sort correctly if I shift click the columns, but I want it to happen automatically on load.

Thanks!

Sorry if this has been answered, I searched around the forum and could not find anything.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Please link to a test case showing the issue (as required in the forum rules). Here is a little example showing it working: http://live.datatables.net/heraqih/1/edit . So there is something else going on - but without a test case, I have no idea what!

    Allan
  • pfiorellapfiorella Posts: 8Questions: 2Answers: 0
    Oops! Sorry, here's a test case showing all the datatables options I'm trying to use, however, it seems that it won't even sort, which doesn't happen on my real site. http://live.datatables.net/wihuvus/1/edit
This discussion has been closed.