Bootstrap-table: Is there a way to highlight row or value after update(edit)?

Created on 5 Mar 2018  路  6Comments  路  Source: wenzhixin/bootstrap-table

Is there a way to highlight row or value after the edit popover window closed if the value changed?
Thanks a lot.

awaiting reply editable

All 6 comments

I had to do this for a previous project. One way would be to create tracking field for each column you need to highlight.
Let's say you have the following json:

[{id:1,amount:100}]

Add field with same name but "changed" on the end for each "tracking" field.
[{id:1,amount:100,AmountChanged:0}]

The amount changed field will be used for the CELLSTYLE function to show as normal when 0 but show highlighted when 1

When the user edits and saves the field, trigger from the onEditableSave(editable-save.bs.table) event -

  • change the AmountChanged value from 0 to 1. This will allow the CELLSTYLE formatting to highlight the cell.

Use the table edit extension

Thank for your reply.
I tried this to change the value of another field and it worked.
onEditableSave: function (field, row, oldValue, $el) { $table.bootstrapTable('updateRow', { index: row.index, row: { date_s : '2018/03/06' } }); }

But how to highlight a row?

Use the ROWSTYLE . Rowstyle has row as an agrument.. You have access to all values for that row. So it could be something like or'ing the change tracking fields

if (row.AmountChanged || row.SalaryChanged || row.CostChanged).

I think this feature is supported by default:
image

http://issues.wenzhixin.net.cn/bootstrap-table/

Close this issue because there is no any response in 7 days, if the problem exists reopen it, thanks!

Is there a way to highlight row or value after the edit popover window closed if the value changed?
Thanks a lot.

Great idea.
How it's possible to do this??

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simkeyur picture simkeyur  路  19Comments

jesussuarz picture jesussuarz  路  17Comments

thongkekienthuc12 picture thongkekienthuc12  路  16Comments

havok2063 picture havok2063  路  39Comments

marccollin picture marccollin  路  15Comments