Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
datatable - sorting multiple columns

I am using jquery data table to sort a few columns from my table. This is a sample of my table currently:

table

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!