Column headers gone after adding horizontal scroll
Column headers gone after adding horizontal scroll
jchappell99
Posts: 15Questions: 0Answers: 0
I have a table with many columns so I added horizontal scrolling. After adding the 3 lines of code:
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true,
The column headers are now gone...... Full code below:
$(document).ready(function () {
$("#get").click(getUserNames());
});
var getUserNames = function () {
$("#retiredTable").dataTable({
"oLanguage": {
"sZeroRecords": "No records to display",
"sSearch": "Grid Search"
},
"aLengthMenu": [[25, 50, 100, 150, 250,-1], [25, 50, 100, 150, 200, "All"]],
"iDisplayLength": 25,
"bSortClasses": false,
"bStateSave": false,
"bPaginate": true,
"bAutoWidth": false,
"bProcessing": true,
"bServerSide": false,
"bDestroy": false,
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true,
"sAjaxSource": "GetData.asmx/GetRetiredData",
"bJQueryUI": true,
//"sPaginationType": "full_numbers",
"bDeferRender": true,
"fnServerParams": function (aoData) {
aoData.push({ "name": "iParticipant", "value": $("#participant").val() });
},
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"type": "GET",
"url": sSource,
"data": aoData,
"success":
function (msg) {
var json = jQuery.parseJSON(msg.d);
fnCallback(json);
$("#retiredTable").show();
}
});
}
});
}
Patient Name
DOB
Age
Address 1
Address 2
City
State
Zip Code
Key Procedure
Diagnosis 1
Key Physician
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true,
The column headers are now gone...... Full code below:
$(document).ready(function () {
$("#get").click(getUserNames());
});
var getUserNames = function () {
$("#retiredTable").dataTable({
"oLanguage": {
"sZeroRecords": "No records to display",
"sSearch": "Grid Search"
},
"aLengthMenu": [[25, 50, 100, 150, 250,-1], [25, 50, 100, 150, 200, "All"]],
"iDisplayLength": 25,
"bSortClasses": false,
"bStateSave": false,
"bPaginate": true,
"bAutoWidth": false,
"bProcessing": true,
"bServerSide": false,
"bDestroy": false,
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true,
"sAjaxSource": "GetData.asmx/GetRetiredData",
"bJQueryUI": true,
//"sPaginationType": "full_numbers",
"bDeferRender": true,
"fnServerParams": function (aoData) {
aoData.push({ "name": "iParticipant", "value": $("#participant").val() });
},
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"type": "GET",
"url": sSource,
"data": aoData,
"success":
function (msg) {
var json = jQuery.parseJSON(msg.d);
fnCallback(json);
$("#retiredTable").show();
}
});
}
});
}
Patient Name
DOB
Age
Address 1
Address 2
City
State
Zip Code
Key Procedure
Diagnosis 1
Key Physician
This discussion has been closed.
Replies
Allan