Fixed column header width does not match body column widths

Fixed column header width does not match body column widths

IcarusIcarus Posts: 2Questions: 0Answers: 0
edited April 2013 in Bug reports
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

Replies

  • IcarusIcarus Posts: 2Questions: 0Answers: 0
    Anyone?
  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin
    Not sure why this isn't working I'm afraid. I'll need to look into it further. I'll try to make some time over the next few days, but can't promise a fix, as things are fairly busy at the moment!

    Allan
  • killerardvarkkillerardvark Posts: 5Questions: 0Answers: 0
    I'm having this same problem. The overall width of the headers equals the body, but the they dont line up.
  • JugramJugram Posts: 10Questions: 0Answers: 0
    BIt out of context from this question but for some reason aoColumns as null doesnt work for me. any column i give as null doesnt get populated, so i am hardcoding the columns names (i am getting by Json from server side, can that be a issue?)
This discussion has been closed.