How do I make DataTables not sort the table on page load?

How do I make DataTables not sort the table on page load?

mikerobinsonmikerobinson Posts: 2Questions: 0Answers: 0
edited March 2014 in General
Just as the title says. I want the page to be sorted by the server first and only sorted by DataTables when a user clicks on one of the headers. I have tried [code]"bSort": false[/code], but this removes all sorting completely. How do I make it so that the table is sortable, but doesn't get sorted until a user clicks on one of the headers?

Replies

  • robertbrowerrobertbrower Posts: 158Questions: 1Answers: 0
    edited March 2014
    Use , "aaSorting": [] // <-- empty array

    http://datatables.net/forums/discussion/1399/how-to-no-sort-by-default/p1
  • mikerobinsonmikerobinson Posts: 2Questions: 0Answers: 0
    That works great. Thanks so much.
This discussion has been closed.