I am using jquery data table to sort a few columns from my table. This is a sample of my table currently:
I would like to sort total direct member descending, meaning largest to smallest value and then followed by total indirect member with descending as well.
I have looked into using columnDefs to accomplish it like below:
$("#report").DataTable({
"searching": false,
"pageLength": 25,
"processing": true,
"order": [],
"columnDefs": [ {
targets: [ 6 ],
orderData: [ 1, 0 ]
} ],
dom: "lBfrtip"
});
However, it does not sort the records correctly, the output is still the same as shown in the image above.
Is there any mistake that I have made?
Thanks