Using enumeration in sorting function
Using enumeration in sorting function
![FabioLucas](https://secure.gravatar.com/avatar/fbc2191c8908a0b20009292392cfc80d/?default=https%3A%2F%2Fvanillicon.com%2Ffbc2191c8908a0b20009292392cfc80d_200.png&rating=g&size=120)
I have a table with different fields. One of them contains keywords like "good", "bad", "terrible", "perfect". I would like to sort this column in a custom order (keywords would be enumeration like "perfect" = 1, "good" = 2, "bad" = 3, "terrible" = 4). I found the enumeration in the documentation but I did not succeed in using it properly. Can someone help? If you need a reference, here you find an example: http://www.lyra.it/blog/movie-list/
This question has an accepted answers - jump to answer
Answers
Sounds like you want this plug-in :-)
Allan
Thanks, I tried that already but I did not manage to make it work. This was my code: (hope it gets formatted properly)
How can I associate this sorting to a column?
Using the
columns.type
option. There is an example available here.Allan
Thanks a lot, that helped!