Trying to sort multiple columns
Trying to sort multiple columns
Hamsterle
Posts: 1Questions: 0Answers: 0
Hi,
I'm trying to sort multiple columns. I'm expecting it to sort ascending where the second column takes priority over the others, the 5th column has the lowest priority - it doesn't work.
This is my code :
[code]
$(document).ready(function() {
oTable = $('#example').dataTable({
"bPaginate" : false,
"bFilter" : false,
"bInfo" : false,
"bSortable":true,
"bSort" : true,
"aaSorting": [[ 1, "asc" ], [2, "asc"], [3, "asc"], [4, "asc"]],
"aoColumns" : [null,null, null, null,null,null, null]
});
});
[/code]
Do I have to create my own sort algorithm for this to work?
I'm trying to sort multiple columns. I'm expecting it to sort ascending where the second column takes priority over the others, the 5th column has the lowest priority - it doesn't work.
This is my code :
[code]
$(document).ready(function() {
oTable = $('#example').dataTable({
"bPaginate" : false,
"bFilter" : false,
"bInfo" : false,
"bSortable":true,
"bSort" : true,
"aaSorting": [[ 1, "asc" ], [2, "asc"], [3, "asc"], [4, "asc"]],
"aoColumns" : [null,null, null, null,null,null, null]
});
});
[/code]
Do I have to create my own sort algorithm for this to work?
This discussion has been closed.
Replies