I have edit button in datatable defined like this:
columns: [
{
text: 'Edit', cellsAlign: 'center', align: "center", pinned: true, columnType: 'none', width: '4.5%', editable: false, sortable: false, dataField: null,
cellsRenderer: function (row, column, value) {
// render custom column.
return "<button data-row='" + row + "' class='editButtons'>Edit</button>";
}
},
Then I have code on this button click:
$(".editButtons").on('click', function (event) {
var target = $(event.target);
// get button's value.
var value = target.val();
// get clicked row.
var rowIndex = parseInt(event.target.getAttribute('data-row'));
Everything works fine, until I apply filter to datatable. After filter applied, rowindex still have old value
Is there fix for this?
Thanks