Server Side Col Reorder with array based data

Server Side Col Reorder with array based data

ctycoderctycoder Posts: 1Questions: 1Answers: 0

I'm trying to get column reorder to work using the latest datatables with legacy Ajax mode and the array based aaData coming back from the server side.

Reordering works until you page or filter. The column headers are where they are supposed to be but the data goes back to its original column.

On this page it says:
"
https://datatables.net/extensions/colreorder/examples/integration/server_side.html

It is recommend that you use object based data with server-side processing and ColReorder, as this provides easily understandable mapping between the the columns and the data relation on the server, otherwise you need to work out array indexes on each call!
"

Is there any example of how to work out the array indexes after a call?

Answers

  • colincolin Posts: 12,939Questions: 0Answers: 2,204

    I'm not seeing that behaviour on the link you referenced. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.