Multicolumn sorting not working
Multicolumn sorting not working
i am trying to apply sorting on multiple columns but its not working please help.
here is my code
$(document).ready(function() {
$('#reportDetails').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"aLengthMenu": [[20,25, 50, 100, -1], [20,25, 50, 100, "All"]] ,
"sScrollY": "420px",
"aaSorting": [[2,'desc'],[1,'desc']],
"bProcessing": true,
"aoColumns": [{"bVisible" : false, "sWidth": "0%"},
{"sWidth": "40%"},
{"sWidth": "20%"},
{"sWidth": "20%"},
{"sWidth": "20%"}],
"aoColumnDefs":[{
"fnRender":function(obj){
return "" + obj.aData[1] + "";
},
"aTargets": [1]
}]
});
});
here is my code
$(document).ready(function() {
$('#reportDetails').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"aLengthMenu": [[20,25, 50, 100, -1], [20,25, 50, 100, "All"]] ,
"sScrollY": "420px",
"aaSorting": [[2,'desc'],[1,'desc']],
"bProcessing": true,
"aoColumns": [{"bVisible" : false, "sWidth": "0%"},
{"sWidth": "40%"},
{"sWidth": "20%"},
{"sWidth": "20%"},
{"sWidth": "20%"}],
"aoColumnDefs":[{
"fnRender":function(obj){
return "" + obj.aData[1] + "";
},
"aTargets": [1]
}]
});
});
This discussion has been closed.
Replies
what error are you having?
http://live.datatables.net/upaxer/edit#javascript,html,live
(note changed the table id to #example)