ColReorder (v1.0.4) Issues with DataTables 1.81 - Selecting column selects the entire thead

ColReorder (v1.0.4) Issues with DataTables 1.81 - Selecting column selects the entire thead

chanderchander Posts: 3Questions: 0Answers: 0
edited September 2012 in DataTables 1.8
I recently upgraded to the latest version of jQuery (1.8.1) from 1.7, and also upgraded to Jquery-UI v 1.8.23 , after doing so I'm finding that the ColReorder plugin for DataTables (versions mentioned in title) no longer seems to work properly. It seems that when selecting a column to drag, the "_fnCreateDragNode" doesn't seem to filter out all the table columns - it leaves all the headings intact.

When entering the function "$(this.s.dt.nTHead.parentNode).clone(true)[0];" returns (looking at this.dom.drag):




​shape_fid​​
​shape_area​​
​lease_numb​​




And at the end of the function it looks like this:




​shape_fid​​
​shape_area​​
​lease_numb​​




Any ideas as to what I might be missing here?

Thanks!

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    > Any ideas as to what I might be missing here?

    Nothing - it appears that jQuery 1.8.1 changed something so that the selector that ColReorder was using no longer works :-(. I've just committed a fix to ColReorder which changes the way it works, so that it will now work with jQuery 1.8.1. You can download the ColReorder change as part of the 1.0.8.dev nightly from the downloads page: http://datatables.net/download .

    Regards,
    Allan
  • chanderchander Posts: 3Questions: 0Answers: 0
    So I'm using the code now. However, I'm having the same issue that other people on the forums seem to have had.

    http://datatables.net/forums/discussion/3019/hiding-columns-with-aocolumndefs-or-with-colvis-is-not-compatible-with-multi_filter-example/p1

    When I start out, I have several columns hidden (for example, the GID column is hidden always by default.) when I choose to display the column, the function that adds events has not added the events to the column, and as a result none of the code tied to the column works.

    I can fix this by adding in some code to attach the event when the column is unhidden, but it seems like it would be more beneficial to attach the event to the column on initialization - does that make sense?

    You should be able to see the issue here:

    https://ermadev.dyndns.org/arctic/lq/poly_query/summary/1683880116414664b64cee1a7036f865

    thanks
  • chanderchander Posts: 3Questions: 0Answers: 0
    Hi Allan,

    Nevermind about my last email, I fixed the issue to suit my needs.

    thanks

    chander
This discussion has been closed.