resizing table headers does not resize table colReoderWithResize

resizing table headers does not resize table colReoderWithResize

bugreportbugreport Posts: 10Questions: 0Answers: 0
edited October 2011 in Plug-ins
Hi,
i am using the colReoderWithResize plugin, but it looks like it isn't build for the latest version of datatables (1.8.2)
When i resize the table header, the rest of the table keeps its original width. This is because the tabel is not realy one table but actuelay it is two (header and data).
the tabel used in the example is only one table. has someone a solution to fix this problem?

thanks in advance

Replies

  • josepharmbrusterjosepharmbruster Posts: 2Questions: 0Answers: 0
    I am experiencing the same issue, using ColReorderWithResize.js v 1.0.5. I started digging into the resize code and have hit line 868:

    if(scrollXEnabled)
    $($(tableScroller)[0].childNodes[0]).width(this.table_size + moveLength);

    my table_size is 1364
    and moveLength is 290

    I do not know much about the datatables internals yet but the table size and move length (for this particular event) seem reasonable. I will keep digging.
  • josepharmbrusterjosepharmbruster Posts: 2Questions: 0Answers: 0
    edited March 2012
    In my case, I determined that the issue lies in how the scrollingTableHead variable is being set.

    I changed:
    scrollingTableHead = $(tableScroller)[0].childNodes[0].childNodes[0].childNodes[0];
    to:
    scrollingTableHead = $(tableScroller)[0].childNodes[0].childNodes[0].childNodes[1];

    Here's a dump of the hierarchy:
    $(tableScroller)[0].childNodes[0].childNodes[0]

    ​…​​


    // ?????
    $(tableScroller)[0].childNodes[0].childNodes[0].childNodes[0]
    Text

    $(tableScroller)[0].childNodes[0].childNodes[0].childNodes[1]
    ...


    bugreport - do you see the same issue?
  • ObbiObbi Posts: 6Questions: 0Answers: 0
    I'm currently having the same kind of issue with 1.0.5. Even with fnAdjustColumnSizing, resizing causes a lot of misalignment with the cells. I was kind of wondering if anybody's got an alternative solution to this by now.
  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    Not yet I'm afraid. I do have plans to writing a supported column resizing plug-in for DataTables (a "first class extra" like TableTools etc), but haven't yet had the time to do so I'm afraid. It is on the cards when I can get that far through my to-do list though :-).

    Allan
  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    You might want to try http://live.datatables.net/utagab/5/edit#preview
This discussion has been closed.