Change orderData order for multi columns.
Change orderData order for multi columns.
chait
Posts: 5Questions: 2Answers: 0
Hi Allan,
How to change the orderData order. i.e orderData [1, 0] in this sequence, when we sort it's sorted either ascending or descending order on both the columns. But I want to make the first index of array to be descending order only. irrespective of zero index of array sorting order.
we can use columns.order to make redraw the table I have to write too much code. Since i am working with more tables.
Thanks,
This discussion has been closed.
Answers
https://www.datatables.net/examples/basic_init/multi_col_sort.html
Is this what you're looking for? You can basically make it target multiple columns at the same time when looking at an initial sort.
You can use
columns.orderSequence
to control the ordering sequence for a column, but what you apply to the host column, when usingcolumns.orderData
multicolumn sorting, will be applied to the second column.It is not correctly possible to have them in different sorting directions when using
columns.orderData
.Allan
Thanks for getting back, but columns.order is working for me.