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

224
Vistas
Bootstrap table how to change column value by jquery

I am using bootstrap table to display my data. I used a data formatter on a column like:

formatter: function (value, row, index) {
   var html = $.common.sprintf("<input class='form-control' type='text' id='yqBdItemList[" + index + "].price' name='yqBdItemList[%s].price' value='%s'>", index, value);
    return html;
          }

then using jquery to set value,but it's not working :

$('#yqBdItemList[0].price').val('1111')

if i use updateCell or updateRow, the select2 column will invalid good not woring

bootstrap-table onLoadSuccess function:

 function onLoadSuccess(data) {
        $.fn.select2.defaults.set("theme", "bootstrap");
        $("select.form-control").each(function () {
            $(this).select2().on("change", function () {
                const data = JSON.parse($(this).select2('val'))
                console.log(data)
                // $(this).valid();
            })
        })
        $(".check-box").each(function () {
            $(this).iCheck({
                checkboxClass: 'icheckbox-blue'
            })
        })
    }

the onLoadSuccess will invalid after updateCell or updateRow

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