Sorting on decimal not working with ajax
Sorting on decimal not working with ajax
I have a table that is loaded via ajax and I cannot get a numeric type field to sort properly.
I have the sType set to "numeric" and all the values are formatted like so xxx.xx ( i.e. 123.99 )
It sorts like this however...
9.71 , 876.88, 843.00, 7.34, 655.99, etc....
What could I be missing??
[code]
'aoColumns':
[
{ "sName": "oid", "bVisible":false},
{ "sClass": "center icon",'sName': 'shipped'},
{ "sType": "date", "sClass":"date", 'sName': 'date'},
{ "sClass":"invoice", 'sName': 'invoice' },
{ "sClass":"name", 'sName': 'name' },
{ "sClass":"email", 'sName': 'email' },
{ "sClass":"pay-type",'sName': 'paytype' },
{ "sType": "numeric", "sClass":"grandtotal", "sName": "grandtotal"},
{ "sName":"view", "sClass": "center"}
],
[/code]
I have the sType set to "numeric" and all the values are formatted like so xxx.xx ( i.e. 123.99 )
It sorts like this however...
9.71 , 876.88, 843.00, 7.34, 655.99, etc....
What could I be missing??
[code]
'aoColumns':
[
{ "sName": "oid", "bVisible":false},
{ "sClass": "center icon",'sName': 'shipped'},
{ "sType": "date", "sClass":"date", 'sName': 'date'},
{ "sClass":"invoice", 'sName': 'invoice' },
{ "sClass":"name", 'sName': 'name' },
{ "sClass":"email", 'sName': 'email' },
{ "sClass":"pay-type",'sName': 'paytype' },
{ "sType": "numeric", "sClass":"grandtotal", "sName": "grandtotal"},
{ "sName":"view", "sClass": "center"}
],
[/code]
This discussion has been closed.