Column Formatting Issue?

Column Formatting Issue?

infamousstudiosinfamousstudios Posts: 3Questions: 0Answers: 0
edited April 2013 in General
Hey guys, I'm using a plugin called Tablepress which uses the DataTables JavaScript library. And I'm having a problem with the formatting of columns. I've been told by the plugin author that it has something to do with the way the width of the head row is calculated.

Basically what happens is the columns don't line up properly. If a table has more than 10 entries I can click on the pagination to move to the next set of entries and the formatting becomes fixed. But is messed up upon page load each time.

You can see the issue occurring at: http://www.threestarracing.com/?product=sct-sf3-power-flash-3015

You can view our discussion with the plugin developer at: http://wordpress.org/support/topic/column-formatting-issue?replies=2

Any help will be greatly appreciated.
Thank you,
Jon

Replies

  • infamousstudiosinfamousstudios Posts: 3Questions: 0Answers: 0
    If anyone has any ideas it would be greatly appreciated,

    Thank you,
    Jon
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Hi Jon,

    The issue is that the table has no width when it is initialised since it is initialised hidden. You need to call fnAdjustColumnSizing when it is made visible.

    See also this example: http://datatables.net/release-datatables/examples/api/tabs_and_scrolling.html

    Allan
  • infamousstudiosinfamousstudios Posts: 3Questions: 0Answers: 0
    Thank you for your response Allan, I will try to figure out how to implement this.

    I will report back with results after playing with it.

    Thank you again, have a good weekend,
    Jon
This discussion has been closed.