rowReorder not working
rowReorder not working
Hello;
I try to use rowReorder but it is not working correctly,
This is my Datatable create
function createSquad() {
oTable3 = $('#MyDataTable3').show().DataTable({
"columns": [
{ "data": "PersonalCode" },
{ "data": "FullName" },
{ "data": "Email" },
],
bProcessing: true,
bStateSave: false,
bPaginate: true,
"bDestroy": true,
destroy: true,
"searching": false,
"bFilter": false,
"bLengthChange": false,
"pageLength": 3,
"info": false,
"rowReorder": {
"dataSrc": ""
}
})
}
Bind to datatable;
function addEmployeeToDt()
var data2 = {
PersonalCode: data.Code,
FullName: data.FullName,
Email: data.Email
}
$('#MyDataTable3').dataTable().fnAddData(data2);
}
Answers
The problem might be that you need to set a dataSrc. The RowReorder doc states this:
If this doesn't help then please be more specific about what is not working. Maybe you can post a link to your page or a test case with the issue:
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin