How to disable sorting

How to disable sorting

edited August 2010 in General Posts: 3
DataTables is fantastic, I am using it for our church. I do not want the table data to be sorted,
It actually already is sorted by the books of the Bible. So, is it possible to disable the sorting?
Will this effect the search in any way?


  • alal
    Posts: 3
    After searching I guess I set the aaSorting array to empty. My assumption is that its like this:
    "aaSorting": []
    Don't know if that is the proper syntax, but will give it a try.
  • alal
    Posts: 3
    Yep, that did the trick. To disable sorting completely I did this:

    $('#example').dataTable( {
    "bJQueryUI": true,
    "sPaginationType": "full_numbers",
    "aaSorting": []
    } );

    I had to add a comma after "full_numbers",
    and then I added the line:
    "aaSorting": []

    Thats all there was to it.
  • edited August 2010 Posts: 49
    The correct (official) way is, I believe:
    $(document).ready( function () { $('#example').dataTable( { "bSort": false } ); } )

This discussion has been closed.