ColReorder - How to set current order as the order

ColReorder - How to set current order as the order

abakerabaker Posts: 1Questions: 1Answers: 0
edited April 2015 in Free community support

So after a person re-orders a column I need to send the new position to the server. So I do some calculations and figure out which column moved and to where. But then I need to set this new order as the order for next time.

To be a bit more clear, when I call table.colReorder.order() it returns me the current order.

0: 0
1: 5
2: 1
3: 2
4: 3
5: 4
6: 6
7: 7
8: 8
9: 9
10: 10
11: 11
12: 12

and now that I have saved the columns order, I need it to sort of reset. so even though col5 moved to position 1, thats really now col1 for me.

0: 0
1: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 10
11: 11
12: 12

So now I want how the current column order is to look like this.

This discussion has been closed.