good, we are doing tests with the editor to see if it is good for our company and we have a problem when editing, to create it works well but when editing in the mvc part the action is not coming to edit but the data reaches 0, could you tell us what the problem is?
var editor;
$(document).ready(function () {
editor = new $.fn.dataTable.Editor({
table: "#datatable",
ajax: {
create: {
type: 'POST',
url: 'http://localhost:55218/task/config/add',
},
edit: {
type: 'POST',
url: 'http://localhost:55218/task/config/edit',
},
delete: {
type: 'POST',
url: 'http://localhost:55218/task/config/delete',
}
},
idSrc: 'codconfig',
fields: [
{
label: "codconfig:",
name: "codconfig"
},
{
label: "Key:",
name: "key"
},
{
label: "Value:",
name: "value"
}]
});
$('#datatable').DataTable({
dom: "Bfrtip",
ajax: {
url: "http://localhost:55218/task/config/list",
type: "GET"
},
serverSide: true,
columns: [
{ data: "codconfig" },
{ data: "key" },
{ data: "value" },
],
select: true,
buttons: [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
]
});
});