How to get (original) column index of column clicked after ColReorder
How to get (original) column index of column clicked after ColReorder
djm
Posts: 20Questions: 4Answers: 0
Hello.
http://jsfiddle.net/b8xn0j12/21/
Works fine if the columns remain in the same order.
If we use ColReorder and the user moves the columns around, then this code reports different (index) values for the (same) column selected.
How can I uniquely determine when the user clicks on a column which (original) index this column originally had (before the user moved it around).
Many thanks in Advance.
This discussion has been closed.
Answers
If I were to assign a "name" this would stay independent of the user sorting the columns.
How can I access this name in the on click handler for the column header?
https://datatables.net/reference/option/columns.name