Tables with hidden columns don't resize

Tables with hidden columns don't resize

bacooper81bacooper81 Posts: 2Questions: 0Answers: 0
edited October 2010 in Bug reports
If a column has "bVisible": false, and your using a liquid layout (elements stretch based on the size of the window), the table does not resize when the window resizes.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Agreed - this is sort of a bug, sort of a feature :-). It was a design decision to have the table at a fixed width at all times, and having it fluid would make some column width calculations (such as the scrolling) nigh on impossible. It's more of a 'grid' program which would do something like that, since they tend to use 'div's for the layout rather than table cells, and setting width is trivial. One option is to manually set the table width and then call fnAdjustColumnSizing to update the columns.

    It is something I'd like to take a look at in future version to see if it can be improved, but probably not in the next few versions.

    Allan
  • bacooper81bacooper81 Posts: 2Questions: 0Answers: 0
    I was able to get it to resize using fnAdjustColumnSizing, but also needed to add these properties:

    "sScrollY": "100%",
    "bScrollCollapse": true,
This discussion has been closed.