Have a different Display Value, but sort by original value DataTables jQuery
I'm having a slight issue, I am using DataTables and I have the following
data in a column
1-2
3
4
5
6
7-8
9
and so on. Currently, these are being treated as strings, and so the
sorting is messed up. When I change their values to integers, the sorting
is fine, however, I loose the information, instead of showing 1-2 it shows
1 and instead of 7-8 it shows 7 and so on.
I am wondering if I can have a "Displayed" value and a "sorting value".
Making it so DataTables displays it as strings, but uses the values that I
have changed into integers for sorting. It would be great it someone could
help me with this!
No comments:
Post a Comment