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

2K
Views
Jquery DataTable: Sum table rows and columns

I want to create a table where ROW AND COLUMN sums both are displayed

Footer Callback covers showing running column sums https://datatables.net/examples/advanced_init/footer_callback.html

But I would like to have like below Picture a footer row summing the columns and the last column showing row sums and it should work together with row and column filtering

enter image description here

Could someone please tell me how to do it with JQuery DataTables

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

To show the sum of row, you'll need to add a new column 'Total' just like in your image. You can show the sum of particular columns in this.

  • First add new <th>Total</th> in the thead

  • Then add new column in columns while initializing dataTable

     {
       "targets": 0,
       "data": null,
       "render": function ( data, type, row, meta ) {
                return parseInt(row.column1,10) + parseInt(row.column2,10) + parseInt(row.column3,10);
       }
     }
    
about 4 years ago · Juan Pablo Isaza Report
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!