Remove row not removing from Database
Remove row not removing from Database
nomi1122
Posts: 1Questions: 1Answers: 0
My initialization is
var editor;
editor = new $.fn.dataTable.Editor( {
ajax: "includes/processes/datatables.php?actionDD=IndbMark",
table: "#IndbMark",
fields: [
{
label: "ID:",
name: "ss_benchmarksector.ID",type:"hidden"
},{
label: "Benchmark:",
name: "ss_benchmarksector.BenchmarkID",
type:'select'
},
{
label: "Sector:",
name: "ss_benchmarksector.SectorID",
type:"select"
},
{
label: "Value:",
name: "ss_benchmarksector.Value",
},
{
label: "Notes:",
name: "ss_benchmarksector.Notes",
}
]
} );
// Activate an inline edit on click of a table cell
$('#IndbMark').on( 'click', 'tbody td:not(:first-child)', function (e) {
editor.inline( this, {
buttons: { label: '>', fn: function () { this.submit(); } }
} );
} );
$('#IndbMark').DataTable( {
dom: "Bfrtip",
ajax: "includes/processes/datatables.php?actionDD=IndbMark",
responsive: true,
destroy: true,
columns: [
{
data: null,
defaultContent: '',
className: 'select-checkbox',
orderable: false
},
{ data: "ss_benchmarksector.ID" },
{ data: "ss_benchmark.Name",editField:"ss_benchmarksector.BenchmarkID"},
{ data: "sel_sector.NAME",editField:"ss_benchmarksector.SectorID"},
{ data: "ss_benchmarksector.Value"},
{ data: "ss_benchmarksector.Notes" },
],
order: [ 1, 'asc' ],
select: {
style: 'os',
selector: 'td:first-child'
},language: {
searchPlaceholder: "Search records",
search:""
},
buttons: [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
]
} );
The remove button is removing the row from the table but it couldn't delete from database. It down't give any error.
This discussion has been closed.