Bug when sorting data
Bug when sorting data
anxious
Posts: 11Questions: 0Answers: 0
Hello, everything is worked as wanted exept for one thing :
you should have a look at http://www.gamer-certified.fr/statistiques/recapitulatif.php
to understand : look the value
gl-serv 13 96%
crystal-serv 31 96.5%
96% is higher ranked than the 96.5%
is that a bug or did i missed somthing ?
PS: it doesn't happend to others data with float value
Thanks
you should have a look at http://www.gamer-certified.fr/statistiques/recapitulatif.php
to understand : look the value
gl-serv 13 96%
crystal-serv 31 96.5%
96% is higher ranked than the 96.5%
is that a bug or did i missed somthing ?
PS: it doesn't happend to others data with float value
Thanks
This discussion has been closed.
Replies
i guess you're rigth because before i begin to use the STAR rendering, there were no problem.
(1) is not an option (2) is over my skill :P
can't i force the column to be detected as a number type ?
I removed the symbol "%" but it's still nor working,
here how are set the column :
[code]'.$average*2 .'
'.$average.'// to display the stars according to the $average value
[/code]
here's the table options :
[code]
$('#recap').dataTable( {
"bPaginate": false,
"aaSorting": [[ 1, "desc" ], [3,'desc']],},
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
});
[/code]
thanks
[code]
$('#recap').dataTable( {
"bPaginate": false,
"aaSorting": [[ 1, "desc" ], [3,'desc']],},
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
{ "fnRender": function(oObj) {
return oObj.aData[3] + "%";
}
},
null,
null,
null,
null
]
});
[/code]
or something like that. This is basically using the column configuration shown here: http://datatables.net/usage/columns#fnRender. It allows you to just put your raw data in the table, but have it displayed in a fancier way.
so your table would then only be:
[code]
'.$average*2 .'
[/code]
i'll test it ASAP
[code]
"bJQueryUI": true,
"bUseRendered": false,
"aoColumns": [
null,
null,
null,
{ "fnRender": function(oObj) {
return oObj.aData[3] + "%";
}
},
null,
null,
null,
null
],
[/code]
It's still not working, i mean, the stars are correctly shown with the correct values, but it's like there is no data in that column (average displayed as 'moyenne' in my website) cause i can't sort it
=''(
Do you have any idea ?
Thank you for your help ;)
http://datatables.net/plug-ins/sorting#percentage
Allan