Datatable moveColumn of hidden rows

Example: If you want to enable drag&drop inside the headermenu of a datatable it doesn’t really work well with hidden rows.

Snippet: Code Snippet

Hi, @Jendrik !
As I can see in the snippet, the reason of unexpected behavior is attaching onAfterDrop event:

$$($$('table').config.headermenu).attachEvent('onAfterDrop',  function(context) {
          $$('table').moveColumn(context.start, context.index)
        });

If this code wasn’t written on purpose, you can just delete it: Code Snippet

Or if I didn’t understand you correctly, please specify what kind of behavior you would like to achieve

My goal was to move the columns inside the datatable according to changes done in the headermenu.

f.e. drag “7” to the first position in headermenu and it will also change in the datatable

Well, yes, moveColumn only works with visible columns and there are no hidden columns in the DOM.
To achieve something similar maybe you can try to get all the columns, change the order of the elements in the array, and then set a new config.