I have such snippet, this works well:
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 ?
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 ] }