How can I order a select box below a column?
How can I order a select box below a column?
![[Deleted User]](https://secure.gravatar.com/avatar/896f3dbf19e4d835f8926273eae08919/?default=https%3A%2F%2Fvanillicon.com%2F896f3dbf19e4d835f8926273eae08919_200.png&rating=g&size=120)
https://datatables.net/examples/api/multi_filter_select.html
I have a column named duration with different options.
I want to show them in that kind of order:
1-2 months, 3-4 months, 1-2 years
But because of string ordering it shows it in this order:
1-2 months, 1-2 years, 3-4 months
I tried using https://datatables.net/examples/plug-ins/sorting_manual.html but that's only working for the table itself I think and not the select box.
This discussion has been closed.
Answers
This code in the multi filter example:
Is the code sorting the select list. You will need to change this code to sort the list in the order you want. It is not something Datatables will do for you nor will the ordering plugin affect this list. The Javascript code needed is specific to the data you have and the order you want it in.
Kevin