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

216
Visualizações
How to calculate all the colums values with Bootstrap table extension

i have trouble using bootstrapTable plugin,

i use options to initialize my table.

$jq(`#table_${posInd}`).bootstrapTable({
  columns: [{
    field:'first',
    title: '',
    footerFormatter: '',
    // footerField:''
  },{
    field: 'indicateur',
    title: champUnite,
    // footerField:'',
    footerFormatter: 'TOTAL',
  },
  {
    field:'nombre',
    title:labelTab,
    footerFormatter: numberFormatter(myData),
    // footerField:'number',

  },
  {
    field:'percent',
    title:'%',
    footerFormatter: percentFormatter(myData),
    // footerField:'pourcent',
  }],
  search: true,
  autoRefresh: true,
  // sortable: true,
  // pagination: true,
  iconsPrefix : 'icon',
  data: myData,
});

So this is the function and the option i use, i made 2 function to calculate the total of my columns. the options footerFormatter allow me to add content in my footer, so with that it's working.

I was wondering if there is maybe a better way ? maybe bootstrap table comes with any method to calculate total ??? Because i didn't find any for now

thank you for being indulgent for my english :)

about 4 years ago · Juan Pablo Isaza
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