Fixed Width Columns

Fixed Width Columns

RememberMeRememberMe Posts: 11Questions: 0Answers: 0
edited February 2010 in General
I'm having trouble assigning widths to my columns. No matter what I change, the grid always looks exactly the same with what I assume is auto-generated widths. I tried setting very large widths to ensure that none of my data was larger than the width. I've also played with the width and overflow of the gridcontainer with no luck.
[code]
function formatGrid() {

oTable = $('#subcontractlist').dataTable(
{
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
"bAutoWidth": false,
"iDisplayLength": 100,
"aoColumns": [{ "bSortable": false, "bVisible": false }, { "bSortable": false }, { "bSortable": false }, { "bSortable": false },
{ "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" },
{ "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" },
{ "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" },
{ "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" },
{ "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "300em" }, { "sWidth": "1000em" }, { "sWidth": "300em"}]
}
);
}
[/code]
[code]

[/code]

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Could you post an example please? The table above should be very wide I would have thought! DataTables should certainly apply sWidth...

    Allan
  • RememberMeRememberMe Posts: 11Questions: 0Answers: 0
    Just revisited this. Realized I had table-layout set to fixed for my div container, but not for the actual table.
This discussion has been closed.