TH does not align with the table
TH does not align with the table
salil
Posts: 10Questions: 0Answers: 0
I am using Fixed Columns in my Table to freeze the first 4 columns.
Everything except the alignment of the TH works fine. I am able to render TH properly when the Table loads for the first time by specifing the class, however after a client side event like Sort, Search the aligment goes off. I checked in Firebug and a style element is added after Sort which messes the width.
Below is the code I am using,
$(document).ready(function () {
oTable = $('#tblSourceDataMapp').dataTable({
"oLanguage": { "sSearch": "Search Data Mapping Grid:" },
"iDisplayLength": 10,
"aaSorting": [[0, "asc"]],
"sScrollY": "300px",
"sScrollX": "100%",
"sScrollXInner": "1500px",
"bScrollCollapse": true,
"bStateSave" : true,
"sDom": 'RC<"clear">lfrtip',
"oColReorder": {
"iFixedColumns": 1
},
"oColVis": {
"aiExclude": [0, 1, 2, 3, 4]
}
})
new FixedColumns(oTable, {
"iLeftColumns": 4,
"iLeftWidth": 400,
"sHeightMatch": "none"
});
Table Head,
UID
Term
Category
Products
I even set bAutoWidth to False, but still run in the same issue.
Any pointer would be helpful
Everything except the alignment of the TH works fine. I am able to render TH properly when the Table loads for the first time by specifing the class, however after a client side event like Sort, Search the aligment goes off. I checked in Firebug and a style element is added after Sort which messes the width.
Below is the code I am using,
$(document).ready(function () {
oTable = $('#tblSourceDataMapp').dataTable({
"oLanguage": { "sSearch": "Search Data Mapping Grid:" },
"iDisplayLength": 10,
"aaSorting": [[0, "asc"]],
"sScrollY": "300px",
"sScrollX": "100%",
"sScrollXInner": "1500px",
"bScrollCollapse": true,
"bStateSave" : true,
"sDom": 'RC<"clear">lfrtip',
"oColReorder": {
"iFixedColumns": 1
},
"oColVis": {
"aiExclude": [0, 1, 2, 3, 4]
}
})
new FixedColumns(oTable, {
"iLeftColumns": 4,
"iLeftWidth": 400,
"sHeightMatch": "none"
});
Table Head,
UID
Term
Category
Products
I even set bAutoWidth to False, but still run in the same issue.
Any pointer would be helpful
This discussion has been closed.
Replies
Allan
Allan