Table header width issue (likely simple).

Table header width issue (likely simple).

pjpspjps Posts: 5Questions: 0Answers: 0
edited January 2014 in General
The issue that I'm having is that although the table width is 100% the the widths are fixed. They don't update with window resize, or take up anything close to the roughly 700px it has.

The Initial table is

[code]


[/code]

Which is initialized with

[code]
var oTable = $('#productTable').dataTable({
"sPaginationType": "bootstrap",
"bServerSide": true,
"bAutoWidth:": true,
"sAjaxSource": "/api/products/list/aadata/.json",
"aoColumns": [
{ "mDataProp": "formattedcode", "sTitle": "Product Code" },
{ "mDataProp": "description", "sTitle": "Description"},
{ "mDataProp": "storeinventory", "sTitle": "In Store"},
{ "mDataProp": "totalinventory", "sTitle": "Total"},
],
"fnInitComplete": function() {
this.fnAdjustColumnSizing(true);
},
})
[/code]

Which becomes:

[code]



Product Code

Description

In Store

Total



...
[/code]

Thanks in advance,
PJ

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited January 2014
    Can you link to the page so we can take a look and see what is happening. My guess is the table is initialised hidden, but I don't know.

    Allan
  • pjpspjps Posts: 5Questions: 0Answers: 0
    edited January 2014
    It's not public it's on an intranet, otherwise I'd definitely provide a link. Is there some other way to provide more info?

    Thank you so much, the software is excellent!

    edit: Literally, other than the JSON that's what it is, I'll try to put something together.
  • pjpspjps Posts: 5Questions: 0Answers: 0
    Removing the class attribute on the table tag did it, or certainly appears to fix it in Chrome anyway.

    Cheers,
    PJ
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Odd - but as long as it works, we are all happy :-)

    Allan
This discussion has been closed.