Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82110

Default Sort

$
0
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!

Viewing all articles
Browse latest Browse all 82110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>