DataTables warning: table id=data-table-simple - Requested unknown
DataTables warning: table id=data-table-simple - Requested unknown
I only need to know how to avoid this alert or destroy it. This happens when I create a new row with the create button.
var editor = new $.fn.dataTable.Editor( {
table: "#data-table-simple",
fields: [ {
label: "Vendedor:",
name: "Vendedor"
}
]
});
$('#data-table-simple').DataTable( {
select: 'single',
dom: "Bfrtip",
columns: [
{ data: "Vendedor" },
{ data: "Ver" },
{ data: "Eliminar" },
{ data: "Activar o desactivar" }
],
order: [
[ 0, "asc" ]
],
buttons: [
{ extend: "create",
editor: editor,
text: "Crear"
},
{ extend: "edit",
editor: editor,
text: "Editar"
}
]
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
My guess is you are only returning the 'Vendedor' field when creating the row. This would cause the above error since the data for the other columns is missing. I believe you will want to return all the columns in your
create
response.Kevin
Thanks!