Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

2K
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda