this.s.dt.oInstance.fnColReorder is not a function?

this.s.dt.oInstance.fnColReorder is not a function?

Pranav_udupaPranav_udupa Posts: 2Questions: 1Answers: 0
edited September 2016 in Free community support

Hello,

DataTables is a great tool. One of my pages uses Buttons, colVis and fixedHeader.
I need to implement colReorder as well. I have used npm and the following is my code.

require('datatables.net-colreorder')(window,$); $("#my_table").dataTable({ colReorder: true, sDom:'ZlBpitp<"info"i>', stateSave: true, .... });

But every time I drag a column I get an error 'this.s.dt.oInstance.fnColReorder is not a function' in the console.

Is there something that I'm missing?
ColReorder 1.3.2 and DataTables 1.10.12

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,824Questions: 1Answers: 10,131 Site admin
    Answer ✓

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

  • Pranav_udupaPranav_udupa Posts: 2Questions: 1Answers: 0

    Hello,

    Thank you for the reply.
    It worked in jsfiddle. Hence, I Invoked require('datatables.net-colreorder')(window,$); right before $("#my_table").dataTable( ) in my actual code. That did the trick for me.

    Thanks.

This discussion has been closed.