int sorting: example_ajax_source.html doesn't work
int sorting: example_ajax_source.html doesn't work
Hi there!
why is the file "/example_ajax_source.html" not able to sort int? (e.g.: "Engine Version"-column)
Firebug says:
a.toLowerCase is not a function
[Break on this error] return false})}}};$.fn.dataTableExt.oSor...sc":function(a,b){var x=a.toLowerCase();
How can I fix it, so numbers will be displayed corretly? If I wrap those numbers with ", The columns will sort, but not correctly (e.g. 1, 10, 100, 2, 3, ...)
Thank you very much!
why is the file "/example_ajax_source.html" not able to sort int? (e.g.: "Engine Version"-column)
Firebug says:
a.toLowerCase is not a function
[Break on this error] return false})}}};$.fn.dataTableExt.oSor...sc":function(a,b){var x=a.toLowerCase();
How can I fix it, so numbers will be displayed corretly? If I wrap those numbers with ", The columns will sort, but not correctly (e.g. 1, 10, 100, 2, 3, ...)
Thank you very much!
This discussion has been closed.
Replies
Thanks very much for catching this. The issue was that I was assuming that each column was type 'string' when a table was created with 0 length. This used to be needed before I changed fnAddData to take account of type detection, and it has this knock-on effect on Ajax. Removing this assumption allows it all to work nicely.
The reason it half worked with the '' quotes, is that it cast the number as a string, but of course then we get the dodgy sorting...
I'll include this fix in 1.4.1 - out tomorrow :-)
Allan