Problem with re-order when table contains hidden columns.

Problem with re-order when table contains hidden columns.

jacksterjackster Posts: 3Questions: 2Answers: 0

Using datatables 1.10.9, I ran into a problem using the ColReorder extension with hidden columns. The first 6 columns of my table are hidden, the 7th is a stationary column, and the rest can be re-ordered. My datatables options include:

colReorder:{fixedColumnsLeft:7}, 

This causes the 1st visible column to act as expected (the column cannot be re-ordered); however, the re-ordering of the remaining visible columns is incorrect. When re-ordering a column, the first available destination column is the visible column 7. It appears the ColReorder extension is using the visible column index instead of the actual data column index when computing the column's destination.

Here is an example,

http://live.datatables.net/zofapuqe/1/edit?html,css,output

Is this a known issue? At the moment, the only work around that I can think about is to place all hidden columns at the end of my table.

Thank you for your help.

Answers

  • jacksterjackster Posts: 3Questions: 2Answers: 0

    I ended up just placing all of my hidden columns at the end of my table. This fixed my problem.

This discussion has been closed.