ColReorder question

ColReorder question

xlzeroxlzero Posts: 6Questions: 4Answers: 0

Hi,

I am trying to use this feature. I included these js

https://code.jquery.com/jquery-1.12.4.js
https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js
https://cdn.datatables.net/colreorder/1.4.1/js/dataTables.colReorder.min.js

but now only the header is moving, not the data body. I do not have complex header, only <th> one level. what else should I inlude?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @xlzero,

    You really don't need to include much, take a look at this minimal example.

    Would you be able to supply the HTML for the table, and the initialisation code too, please?

    Cheers,

    Colin

  • xlzeroxlzero Posts: 6Questions: 4Answers: 0

    Hi,

    Thanks for the reply. I downloaded the example code and it is working. I found out the issue part. My own html table has this column in table
    table header is

    <th class="dom-select">Include</th>

    table body is

    <td><select class="include-flag" name="adjustment_0" id="adjustment_0" >
    <option value="No" >No</option>
    <option value="Yes" selected="selected" >Yes</option>
    </select></td>

    with this column in my table, it is not working, if removed, it is working. Wondering how the table body moving together with the header, is it any special requirement? or just <th> match any <td>

    Thanks

This discussion has been closed.