I'm using Bootstrap-Table in a project and I'd like to move rows up or down.
I have these action events :
window.actionEvents = {
'click .up': function (e, value, row, index) {
var thisrow = $(this).parents("tr:first"),
thisrow.prev().data('index', rowindex);
},
'click .down': function (e, value, row, index) {
var thisrow = $(this).parents("tr:first");
thisrow.insertAfter(thisrow.next());
},
}
It moves rows on screen but it doesn't work really well as row index haven't changed...
So I tried to change the row .data('index')
but it doesn't work...
Has someone succeeded in moving row ?