Sort value for column different from displayed value

Sort value for column different from displayed value

Oliver UtschOliver Utsch Posts: 1Questions: 1Answers: 0

This may be a very common problem, but I did not find any relevant (and easy) solution so far:
I need to sort the rows of a table by a different value that the respective column shows.
Example:
* Value to be displayed: 11,85 m
* Value to be sorted by: 1185

If the sorting happens by the alphynumerical displayvalue, the sorting is wrong is it's interpreted as a string. So it should be sorted by the pure numeric integervalue in cm (which is available in my data).
In footable, there was an option to set an attribute "data-sort-value" which wouldl be used instead. Is there any similar (and simple, meaning no JS coding again) way to do this in DataTables?

Answers

Sign In or Register to comment.