Fixed column header width does not match body column widths
Fixed column header width does not match body column widths
Icarus
Posts: 2Questions: 0Answers: 0
The headers don't line up with the column widths.
Example: http://jsfiddle.net/DyMSb/1/
http://s17.postimg.org/dybznay9b/screen.png
I'm using:
http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables.css
http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables_themeroller.css
http://datatables.net/release-datatables/media/js/jquery.js
http://datatables.net/release-datatables/media/js/jquery.dataTables.js
http://datatables.net/release-datatables/extras/FixedColumns/media/js/FixedColumns.js
Here is the code I'm using:
[code]
$(document).ready(function() {
var aoColumns = [null,null,null,null,null,null,null,null,null,null,null];
var oTable = $('#example').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "150%",
"bPaginate": false,
"bAutoWidth": false,
"aoColumns": aoColumns
} );
var oFC = new FixedColumns( oTable, {
"iLeftColumns": 4
} );
oTable.fnAdjustColumnSizing();
});
[/code]
[code]
Branch
Object
Address
Count
Availability
15
16
17
18
19
20
21
United States of America, Washington
ABC-123
1514 Amber Pond Highway, Nohead Bottom, Washington, 99205-8224, US, (425) 023-9448
7
---
----
United States of America, South Dakota
DEF-456
7827 Stony Pointe, Sunsweet, South Dakota, 57006-2156, US, (605) 621-7800
7
---
----
United States of America, Newfoundland
XYZ-549
2379 Dewy Pioneer Highlands, Humbug, Newfoundland, A7O-6P5, CA, (709) 217-5115
7
---
----
United States of America, Washington
GHI-789
5842 Easy Bay, Kravaksarak, Washington, 98428-9376, US, (425) 998-1922
7
---
----
[/code]
Discussion on StackOverflow: http://stackoverflow.com/questions/16054584/fixed-column-header-width-does-not-match-body-column-widths
Example: http://jsfiddle.net/DyMSb/1/
http://s17.postimg.org/dybznay9b/screen.png
I'm using:
http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables.css
http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables_themeroller.css
http://datatables.net/release-datatables/media/js/jquery.js
http://datatables.net/release-datatables/media/js/jquery.dataTables.js
http://datatables.net/release-datatables/extras/FixedColumns/media/js/FixedColumns.js
Here is the code I'm using:
[code]
$(document).ready(function() {
var aoColumns = [null,null,null,null,null,null,null,null,null,null,null];
var oTable = $('#example').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "150%",
"bPaginate": false,
"bAutoWidth": false,
"aoColumns": aoColumns
} );
var oFC = new FixedColumns( oTable, {
"iLeftColumns": 4
} );
oTable.fnAdjustColumnSizing();
});
[/code]
[code]
Branch
Object
Address
Count
Availability
15
16
17
18
19
20
21
United States of America, Washington
ABC-123
1514 Amber Pond Highway, Nohead Bottom, Washington, 99205-8224, US, (425) 023-9448
7
---
----
United States of America, South Dakota
DEF-456
7827 Stony Pointe, Sunsweet, South Dakota, 57006-2156, US, (605) 621-7800
7
---
----
United States of America, Newfoundland
XYZ-549
2379 Dewy Pioneer Highlands, Humbug, Newfoundland, A7O-6P5, CA, (709) 217-5115
7
---
----
United States of America, Washington
GHI-789
5842 Easy Bay, Kravaksarak, Washington, 98428-9376, US, (425) 998-1922
7
---
----
[/code]
Discussion on StackOverflow: http://stackoverflow.com/questions/16054584/fixed-column-header-width-does-not-match-body-column-widths
This discussion has been closed.
Replies
Allan