Change hard-coded table width on the fly?

Change hard-coded table width on the fly?

tommcktommck Posts: 73Questions: 0Answers: 0
edited August 2011 in DataTables 1.8
I've got an iPad app and, in order to try to reduce reflows/redraws, I'm hard-coding the width of the table and the columns.

When the orientation changes, I need to reset these values and redraw.

I've been doing this for the height with no problem with the following code:

[code]
var body = $('div.dataTables_scrollBody');
body.height(newHeight);
[/code]

unfortunately, this does not seem to work with the width.
I'm calling body.width(newWidth), and it only seems to allow me to increase the size of it, not shrink it.

Is there a different trick I can use?

FYI: I'm using bAutoWidth: false and hard-coding column widths in both orientations as well.

Thanks in advance,

Tom

Replies

  • tommcktommck Posts: 73Questions: 0Answers: 0
    Correction, width change doesn't work, regardless of shrinking or growing.
This discussion has been closed.