RowReorder and FixedHeader not working together

RowReorder and FixedHeader not working together

sunnyar29sunnyar29 Posts: 4Questions: 1Answers: 0

Hi @allan ,

I am not able to make rowreorder and fixedheaders work together whereas it says to be working as per the compatibility table.

my code is as below:

var table = $('#table').DataTable({
            dom: 'Blfrtip',
            "columnDefs": [
                {
                    "targets": 'no-sort',
                    "orderable": false
                },
                { targets: 0, visible: false }
            ],
            "pageLength": -1,
            "paging": true,
            "responsive": true,
            fixedHeader: {
                header: true,
            },
            colReorder: true,
            rowReorder: true,
            "lengthMenu": [[-1, 10, 25, 50], ["All", 10, 25, 50]],
        });

Html file with js files included

<script src="/js/datatables/dataTables.colReorder.min.js"/>
<script src="/js/datatables/dataTables.fixedHeader.min.js"></script>
<script src="/js/datatables/dataTables.rowReorder.min.js"/>

This is the order of js files and have other datatables js files also included. This way row-reordering works but not the fixedHeader functionality If I move the fixedheader js file above the colReorder, fixedHeader works but rowreordering stops.

Can you help me out on this and is there a particular order to include the js files ?

Thanks

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946
    edited July 2018 Answer ✓

    Your example seems to work here:
    http://live.datatables.net/jececebu/1/edit

    I used the Download builder to for the include files.

    Maybe you are not using the latest versions or maybe you have an older version the doesn't work well with the others. I would suggest trying the Download Builder and getting the latest versions, if you can. Otherwise can you update the above test case to show the issue?

    Kevin

  • sunnyar29sunnyar29 Posts: 4Questions: 1Answers: 0

    @kthorngren : Thanks for the comment . Is ColReorder + Complex Columns supported ?

This discussion has been closed.