File size sorting not working
File size sorting not working
Hello all,
I am just starting out with DataTables and struggling to get File size sorting to work. In my smarty template I have added:
[code]$(document).ready(function() {
$('#dropoff_list').dataTable( {
"sPaginationType": "full_numbers",
"aaSorting": [[ 4, "desc" ]],
"aoColumns": [
null,
null,
null,
{ "sType": "file-size" },
{ "sType": "date-euro" }
]
} );
} );[/code]and added the necessary plugins into a .js which I include at the top of the page. When I display the table the column which contains the file size looks like[code]0.01 KB 31/10/2011 09:47:01
0.03 KB 28/10/2011 15:58:17
0.03 KB 28/10/2011 15:34:46
0.03 KB 28/10/2011 15:31:31
0.01 KB 28/10/2011 15:12:57
0.03 KB 27/10/2011 12:44:32
0.03 KB 27/10/2011 12:41:45
0.03 KB 25/10/2011 15:02:38
0.09 KB 25/10/2011 11:40:07
0.09 KB 25/10/2011 11:38:49[/code]Any ideas why it is not sorting correctly please ?
I am just starting out with DataTables and struggling to get File size sorting to work. In my smarty template I have added:
[code]$(document).ready(function() {
$('#dropoff_list').dataTable( {
"sPaginationType": "full_numbers",
"aaSorting": [[ 4, "desc" ]],
"aoColumns": [
null,
null,
null,
{ "sType": "file-size" },
{ "sType": "date-euro" }
]
} );
} );[/code]and added the necessary plugins into a .js which I include at the top of the page. When I display the table the column which contains the file size looks like[code]0.01 KB 31/10/2011 09:47:01
0.03 KB 28/10/2011 15:58:17
0.03 KB 28/10/2011 15:34:46
0.03 KB 28/10/2011 15:31:31
0.01 KB 28/10/2011 15:12:57
0.03 KB 27/10/2011 12:44:32
0.03 KB 27/10/2011 12:41:45
0.03 KB 25/10/2011 15:02:38
0.09 KB 25/10/2011 11:40:07
0.09 KB 25/10/2011 11:38:49[/code]Any ideas why it is not sorting correctly please ?
This discussion has been closed.