ColReorder dosn't work corrent

ColReorder dosn't work corrent

valera.efimov.devvalera.efimov.dev Posts: 2Questions: 1Answers: 0

I am using latest Datatables and ColReorder plugin. Getting data from server-side. When I change columns order, sorting works with old column index. I also use saveState. On localstorage I see datatable saved original index and current. But when I use order or search by individual column datatable using current index but not original. How to fix it? The server does not know that the indexes have changed. And uses the old for searching and order

https://datatables.net/extensions/colreorder/examples/integration/server_side.html on this link сompletely describes everything that I configured. My ajax = url and all. I want save original index on auto-generated payload
if initial columns[0][data]: id and after reorder I want have same index on ajax

Answers

  • colincolin Posts: 14,531Questions: 1Answers: 2,484

    I'm not clear what you mean, sorry. The data sent to the server, "columns[0][data]: position" contains both the column position ('0'), and the column name ('position'), to allow the server-side scripts to respond accordingly.

    Please can you look at this example, and give steps on how to reproduce the issue you want help with,

    Colin

  • valera.efimov.devvalera.efimov.dev Posts: 2Questions: 1Answers: 0

    Hi Colin
    On my server I can't control columns by name. I'm using package for symfony.
    I made a crutch through preXhr event. I was hoping there was a simpler solution to send the original indexes to the server, but use the current ones for the frontend.

Sign In or Register to comment.