Colreorder and table data structure

Colreorder and table data structure

zormi1000zormi1000 Posts: 2Questions: 1Answers: 0
edited December 2021 in ColReorder

Description of problem: Hi, I am loving datatables, first of all :) I have a question regarding data structure after drag & drop with Colreorder plugin. On the screen you can see the change in column order when drag & drop is completed but I cannot see the same change being applied to dt structure -> column order is not changed as data source is not changed, I guess? I am using a charting api to visualize data and I want to push changed data order to charting service but I don't know how to get new column order?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,118Questions: 1Answers: 2,583
    Answer ✓

    There are a couple of API calls that should get you going - take a look at colReorder.order() and colReorder.transpose(). Those two will give you the info you're after,

    Colin

  • zormi1000zormi1000 Posts: 2Questions: 1Answers: 0

    Colin, thank you for your prompt reply. The transpose option should be exactly what I was looking for.

Sign In or Register to comment.