how to get column detected as numeric when using ajax + sort + orthogonal data?
how to get column detected as numeric when using ajax + sort + orthogonal data?
I have a column:
JSON:
"disk_usage": {
"display": "<b>10 MB</b>",
"bytes": "10000000"
},
The column has a sort on it:
JQUERY:
{ data: {
_: "disk_usage.display",
sort: "disk_usage.bytes"
} },
But no matter what I do, it sorts as a string, instead of numeric. Doesn't the auto-detect look at the sort column (which is all numeric data)? What could be causing this.
I also tried using "stype" but it threw a bunch of errors.
Any ideas?
This question has an accepted answers - jump to answer
Answers
You need to add a
type
option as well and tell it to use the bytes since the type detection is currently running on the HTML string.Try:
If that doesn't work, please link to a page showing the issue.
Allan
Worked like a charm :-)
Thank-you for the quick response and help.