changing header size and with fixedheader

changing header size and with fixedheader

joesalandjoesaland Posts: 6Questions: 0Answers: 0
edited February 2010 in FixedHeader
Allan,

It seems with FixedHeader enabled, if something expands the size of the table, say a detail row similar to your show row details example, the cloned header does not get recloned to the new table width which cause all sorts of alignment and redraw problems.

Is there a way to cause FixedHeader to pickup the change, perhaps force it to reclone the header on an event which changes that width?

Joe

PS thanks for the help before with my previous detailrow formatting issue, new 1.6.1 code worked like a charm.

Replies

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin
    edited February 2010
    Hi Joe,

    Good to hear that 1.6.1 is doing the trick :-).

    There is indeed a function you can call to update the cloned header information (including the width). What to do is something like this:

    [code]
    /* save the pointer to the FixedHeader instance */
    var fixedHeader = $.fn.dataTableExt.FixedHeader( oTable );

    /* call this whenever you need to update the clone */
    fixedHeader.fnUpdate();
    [/code]
    Hope that helps!

    Regards,
    Allan
  • ElfayerElfayer Posts: 26Questions: 4Answers: 0
    In dataTables 1.10 it doesn't work for me, I have to do like follow : http://datatables.net/forums/discussion/19124/simple-solution-for-fixedheader-column-headers-not-changing-on-window-resize
This discussion has been closed.