3
Is it possible to remove a line from the datatable by id? It’s that I have a confirmation modal asking if the user wants to delete. If you click yes, it calls a delete function.
$('#confirm-delete').on('show.bs.modal', function(e) {
var data = $(e.relatedTarget).data();
$('.btn-ok', this).data('recordId', data.recordId);
$('#message_confirm_delete').html(data.message);
});
$('#confirm-delete').on('click', '.btn-ok', function(e) {
var id = $(this).data('recordId');
$('#confirm-delete').modal('hide');
$.deleta2(id);
});
$.deleta2 = function (id) {
var data_table = $('#dataTables-example').DataTable();
console.log(data_table);
};