Default Sort

Default Sort

monkeyjaxcodermonkeyjaxcoder Posts: 5Questions: 0Answers: 0
edited May 2013 in General
I am using databtables and on my initial load I have my first heading as an ID field set to order by ID DESC.

When the table loads it's sorted ASC.

So I tried: (I have 13 headings and want the first field to sort DESC)

$(document).ready( function() {
$('#myTable').dataTable( {

"aoColumns": [
{ "asSorting": [ "desc", "asc", "asc" ] },
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
],
"bStateSave": true,
"sScrollY": "450px",
"bPaginate": true,
"bAutoWidth": false,
"iDisplayLength": 50,
"aLengthMenu": [[50, 100, -1], [50, 100, "All"]],
"sPaginationType": "full_numbers"
} );
} );

Tried this and it does not work.

Any Suggestions?

Thanks!

Replies

  • monkeyjaxcodermonkeyjaxcoder Posts: 5Questions: 0Answers: 0
    Nevermind. After researching this I found by adding "aaSorting": [ ], corrected my issue.
This discussion has been closed.