Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

2K
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda