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

210
Vistas
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 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