Bug in example: ColReorder/col_filter.html

Bug in example: ColReorder/col_filter.html

Ironwil616Ironwil616 Posts: 50Questions: 0Answers: 0
edited October 2011 in Bug reports
I finally got the drag and drop to work without breaking the column filters' indexes. Then I find that using the ColVis plugin to hide columns also breaks the indexes, and now I'm stuck again. I went to the example page:

http://www.datatables.net/release-datatables/extras/ColReorder/col_filter.html

But the example doesn't work. In Chrome I can neither hide and columns nor move them around. In IE I can move them but not hide them.

Replies

  • symfonysymfony Posts: 1Questions: 0Answers: 0
    Can somebody suggest a fix for "ColReorder with individual column filtering" as the example given also has a this bug. You cannot reorder the columns in the example: http://www.datatables.net/release-datatables/extras/ColReorder/col_filter.html
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Sorry about that - with DataTables 1.8 you need to set "bSortCellsTop": true for the table initialisation to get this demo to work. I've just updated the demo.

    Allan
  • smillersmiller Posts: 19Questions: 0Answers: 0
    I find that if I put the filters above the column headers it works like:
    thead
    tr
    th input
    tr
    th column header text

    If you put the header text first and then the filters in the next row it does not work.
    And the example for individual filtering for colReording does not work becuase of this. So I figured thsi out but now when I drag the text it looks like I am dragging the filtering input. Don;t konw how to fix this.
  • smillersmiller Posts: 19Questions: 0Answers: 0
    Well here is my structure for colReorder with individual filtering.
    Hope it helps some people.


    $(function () {
    var oTable = $("#tblResults").dataTable({
    "sDom": 'R<"H"lfr>t<"F"ip<',
    "bJQueryUI": true,
    "bPaginate": false,
    "bFilter": true,
    "bInfo": false
    });

    $("thead input").keyup( function () {
    /* Filter on the column (the index) of this element */
    oTable.fnFilter( this.value, $("thead input").index(this) );
    });

    // Hide Search All Filter
    $(".dataTables_filter").css("display", "none");
    });





    |












    # |


    ID


    EQUIP


    TITLE


    ARTCC


    START


    END


    F/C


    ACTIVITY


    STATUS





    I'm pretty darn close.
    But still trying to look like the text is being dragged and not the filterable input field.
    Also I would like to put a grip icon next to each text.
This discussion has been closed.