How to change column data in a Bootstrap Table column

5.6k views Asked by At

I changed the text of a column in my Bootstrap Table through jQuery:

$('#my_td').text('45,999.54$');

When I get the row object through

var table_data = $('#my_table').bootstrapTable('getSelections');
console.log(table_data);

The last column has the old value. See screenshot. The left red square is the value I get through getSelections and the right red square is the value I changed through jQuery.

Table screenshot

What is the right way to change the last column value and get that same value when using getSelections?

Answer exemple

This worked

$('#listing-employees-massive').bootstrapTable('updateRow', {index: row_index, row: {
    identifier:value
}});
1

There are 1 answers

0
Dennis Hernández On BEST ANSWER

You can use the updateRow method in order to update the row info