Show error message inside datatable
Show error message inside datatable
karibusana
Posts: 11Questions: 5Answers: 0
Hi, is it possible to show error message inside datatable? At the moment I've only achieved to show a popup error with plugin sweetalert. I load table with ajax request this is my code:
var dataTable = $('#mytable').on('error.dt', function (e, settings, techNote, message) {
Swal.fire({
title: 'Ops qualcosa è andato storto!',
text: "Non riusciamo a trovare i dati nel database, per favore contatta l'amministratore di sistema!",
icon: 'error'
});
// Rimuovo l'icona del processing
$("#mytable_processing").css("display", "none");
}).DataTable({ });
This discussion has been closed.
Answers
You could use
infoCallback
perhaps, or create an element withdom
to hold an error message.Colin
Hi @colin thanks for your answer. Is it possible for you to show me how to achieve this? Many thanks