datatable does not load the table header

datatable does not load the table header

kali83kali83 Posts: 18Questions: 0Answers: 0
edited December 2021 in DataTables 1.10


ciao,
posto il codice js

``js
`success: function(data){
if (data.status){
$(document).ready(function() {
$("#tableControll").DataTable( {
scrollY: "800px",
scrollCollapse: true,
fixedHeader: true,
scrollX: true,
"data": data.data,
"columns": [
{
"className": "details-control",
"orderable": false,
"data": null,
"defaultContent": ""
},
{ "data": "art" },
{ "data": "rep" },
{ "data": "oper" },
{ "data": "attiv" },
{ "data": "id_control" },
{ "data": "id_class" },,
{ "data": "val_max" },
{ "data": "val_min" },
{ "data": "val_note" },
]
});
});
var table = '<br>

' + '' + '
ArtRepOperAttivId Contr.ClassVal. MaxVal. MinVal. Note

';
$("#data").html(table);
} else {
alert(data.errMsg);
location.replace("../");
}
},
```

PHP returns a json. I pass the data to datatable there via the return call, because in addition to the data i also have the success status of the actions in php.

thank you

Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Replies

Sign In or Register to comment.