DataTable column header disappeared after sorting
DataTable column header disappeared after sorting
Nethaji
Posts: 1Questions: 1Answers: 0
var table3 = $("#tblFacultySave").DataTable({
@* 68 - CR20210212 - #68 - lakshmi - 20210217 - 'Freeze table header' *@
"scrollY": "700px",
"scrollX": true,
"sorting": false,
"scrollCollapse": true,
"deferRender": true,
"order": [[2, "asc"]],
"columnDefs": [
{ "type": "numeric-comma", targets: "_all" }],
"pageLength": @totalRecordsperPage,
})
$("#tblFacultySave").append('<tr><td><input type="text" name="StaffID' + resultData[i].FACID + '" id="StaffID' +
resultData[i].FACID + '" readonly value="' + STAFFIDNULL + '"/></td><td><input type="text" name="FullName' +
resultData[i].FACID + '" id="FullName' + resultData[i].FACID + '" readonly value="' +
NAMENULL + '"/></td><td><input type="text" name="DepartmentPrimary' + resultData[i].FACID + '" id="DepartmentPrimary' +
resultData[i].FACID + '" readonly value="' + DUKEPRIMARRYDEPARTMENTDB + '"/></td><td><input type="text" name="primaryinstitution' +
resultData[i].FACID + '" id="primaryinstitution' + resultData[i].FACID + '" readonly value="' +
PRIMARYINSTITUTIONNULL + '"/></td><td><input type="text" name="primaryempdepartment' + resultData[i].FACID + '" id="primaryempdepartment' +
resultData[i].FACID + '" readonly value="' + PRIMARYEMPDEPARTMENTNULL + '"/></td><td><input type="text" name="CurrentTitle' +
resultData[i].FACID + '" id="CurrentTitle' + resultData[i].FACID + '" readonly value="' +
CURRENTTITLENULL + '"/></td><td><input type="text" name="CurrentTrack' + resultData[i].FACID + '" id="CurrentTrack' +
resultData[i].FACID + '" readonly value="' + CURRENTTRACKNULL + '"/></td><td><input type="text" name="CurrentTenure' +
resultData[i].FACID + '" id="CurrentTenure' + resultData[i].FACID + '" readonly value="' +
CURRENTTENURENULL + '"/></td><td><input type="button" value="Remove" class="removefaculty"/><input type="hidden" name="Facid' +
resultData[i].FACID + '" id="Facid' + resultData[i].FACID + '" readonly value="' + resultData[i].FACID + '"</td></tr>');
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin