I am using DataTable which I have put some buttons that are not typical of DataTable but BootStrap buttons. The question is: How to reload/update that table or delete that table row when I hit the delete button without using a windows.location.href....?
Ajax code
.done(function(respuesta)
{
var resultado = $.parseJSON(respuesta);
if(resultado)
{
swal({
title: "Buen Trabajo",
text: "Se Elimino",
type: "success",
confirmButtonText: "ok"
},
function(isConfirm)
{
if (isConfirm)
{
tabla_mostrar.row( ('tr') ).remove();//Esta linea de codigo no sirve; es aqui donde debo de hacer el cambio que necesito
}
});
}
else
{
swal("error!!","No Se elimino","error");
}
return resultado;
})
Thanks.
What you want is found in an example of dataTables
working example
if your button is inside the table
what you can do if you are inside your button on click context, or you can assign the element to a variable
inside your done method