Default Sort
Default Sort
monkeyjaxcoder
Posts: 5Questions: 0Answers: 0
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!
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!
This discussion has been closed.
Replies