Quantcast
Viewing all articles
Browse latest Browse all 82130

Default sorting with particular column

I have such snippet, this works well:
aoColumnDefsType = [
            { "sType":"title-numeric", "aTargets":[ 3 ] },  
            { "sType":"title-numeric", "aTargets":[ 7 ] },  
            { "bSortable":false, "aTargets":[ 0 ] },  
            { "bSortable":false, "aTargets":[ 8 ] },  
            { "bSortable":false, "aTargets":[ 9 ] },  
            { "sClass":"center", "aTargets":[ 2, 3, 4, 5, 6, 7 ] }
        ];
"aoColumnDefs":aoColumnDefsType

When starting table, I want my datatable sorted by 6th column descending autmatically.
I tried this but didn't work. I added following line to "aoColumnDefsType"
Shouldn't I use asSorting for this ?
 { "asSorting": [ "desc"], "aTargets": [ 6 ] }

Viewing all articles
Browse latest Browse all 82130

Trending Articles



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