Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!