Datatables Features and Columns
Datatables Features and Columns
jwmonteith
Posts: 13Questions: 0Answers: 0
I have made several attempts to get control of column widths. I turned off automatic column width calculation using bAutoWidth set to false. Then using aoColumns, placed a sWidth definition for each column. But no matter what I try, I can see no difference in my data table output.
On another topic to see the result, I have tried to use sScrollX and sScrollXInner, but can see no difference in my table output.
Finally, I would like to know if there is a way to fix in place the title row, similar to how Excel freeze pane works so when scrolling vertically, the title row remains visible. Please see my code example below.
/* end fnDrawCallback */
//"bPaginate": true,
"bJQueryUI": true,
"bAutoWidth": false,
"bFilter": true,
"sDom": '<"H"ifr>t<"F"p>',
"sScrollX": "50%",
"sScrollXInner": "60%",
//"bScrollCollapse": true,
"iDisplayLength": 15,
//"sPaginationType": "full_numbers",
//"aaSorting": [ [0,'desc']],
"aaSortingFixed": [ [0,'asc']],
//"aoColumnDefs": [
//{ "sWidth": "200px", "aTargets": [ 13 ] }
//],
"oLanguage": {
"sSearch": "Search all columns:"
},
"aoColumns": [
{ "sTitle": "Rank", "sWidth": "20%" },
{ "sTitle": "Ticket", "sWidth": "20%" },
{ "sTitle": "Owner GM", "sWidth": "20%" },
{ "sTitle": "Rel", "sWidth": "20%" },
{ "sTitle": "Category", "sWidth": "20%" },
{ "sTitle": "Subcategory", "sWidth": "20%" },
{ "sTitle": "Status", "sWidth": "20%" },
{ "sTitle": "Problem Issue", "sWidth": "20%" },
{ "sTitle": "Open Date", "sWidth": "20%" },
{ "sTitle": "Days Open", "sWidth": "20%" },
{ "sTitle": "Days on Deck", "sWidth": "20%" },
{ "sTitle": "Prod Deploy ETA", "sWidth": "20%" },
{ "sTitle": "ERF CR", "sWidth": "20%" },
{ "sTitle": "Update Solution", "sWidth": "20%" },
{ "sTitle": "Business Impact", "sWidth": "20%" },
{ "sTitle": "Score", "sWidth": "20%" },
{ "sTitle": "Office", "sWidth": "20%" },
{ "sTitle": "Error Message", "sWidth": "20%" },
{ "sTitle": "Workaround", "sWidth": "20%" },
{ "sTitle": "Open to AV", "sWidth": "20%" },
{ "sTitle": "Added to Deck", "sWidth": "20%" }
],
"aoSearchCols": [
null,
null,
null,
null,
null,
null,
{ "sSearch": "Open" },
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]
});
/* end Datatable */
On another topic to see the result, I have tried to use sScrollX and sScrollXInner, but can see no difference in my table output.
Finally, I would like to know if there is a way to fix in place the title row, similar to how Excel freeze pane works so when scrolling vertically, the title row remains visible. Please see my code example below.
/* end fnDrawCallback */
//"bPaginate": true,
"bJQueryUI": true,
"bAutoWidth": false,
"bFilter": true,
"sDom": '<"H"ifr>t<"F"p>',
"sScrollX": "50%",
"sScrollXInner": "60%",
//"bScrollCollapse": true,
"iDisplayLength": 15,
//"sPaginationType": "full_numbers",
//"aaSorting": [ [0,'desc']],
"aaSortingFixed": [ [0,'asc']],
//"aoColumnDefs": [
//{ "sWidth": "200px", "aTargets": [ 13 ] }
//],
"oLanguage": {
"sSearch": "Search all columns:"
},
"aoColumns": [
{ "sTitle": "Rank", "sWidth": "20%" },
{ "sTitle": "Ticket", "sWidth": "20%" },
{ "sTitle": "Owner GM", "sWidth": "20%" },
{ "sTitle": "Rel", "sWidth": "20%" },
{ "sTitle": "Category", "sWidth": "20%" },
{ "sTitle": "Subcategory", "sWidth": "20%" },
{ "sTitle": "Status", "sWidth": "20%" },
{ "sTitle": "Problem Issue", "sWidth": "20%" },
{ "sTitle": "Open Date", "sWidth": "20%" },
{ "sTitle": "Days Open", "sWidth": "20%" },
{ "sTitle": "Days on Deck", "sWidth": "20%" },
{ "sTitle": "Prod Deploy ETA", "sWidth": "20%" },
{ "sTitle": "ERF CR", "sWidth": "20%" },
{ "sTitle": "Update Solution", "sWidth": "20%" },
{ "sTitle": "Business Impact", "sWidth": "20%" },
{ "sTitle": "Score", "sWidth": "20%" },
{ "sTitle": "Office", "sWidth": "20%" },
{ "sTitle": "Error Message", "sWidth": "20%" },
{ "sTitle": "Workaround", "sWidth": "20%" },
{ "sTitle": "Open to AV", "sWidth": "20%" },
{ "sTitle": "Added to Deck", "sWidth": "20%" }
],
"aoSearchCols": [
null,
null,
null,
null,
null,
null,
{ "sSearch": "Open" },
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]
});
/* end Datatable */
This discussion has been closed.