Sorting numeric with .
Sorting numeric with .
The Sorting on my column with numbers doesnt work.
I try it with sType "numeric" but i get always the rong result.
[code]
$(document).ready(function() {
/* ANFANG -- dataTable */
oTable = $('#sortierbar').dataTable({
"bJQueryUI": true,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{ "sType": "numeric", "aTargets": [ 3 ] }
],
"aoColumns": [
null, null, null,
{ "sSortDataType": "dom-text", "sType": "numeric" },
null, null, null, null, null, null, null,
null, null, null,
null
]
});
/* Hide the second column after initialisation */
oTable.fnSetColumnVis( 2, false );
/* ENDE -- dataTable */
} );
[/code]
The result i get:
9.774
82.010
8.896
792.010
I try it with sType "numeric" but i get always the rong result.
[code]
$(document).ready(function() {
/* ANFANG -- dataTable */
oTable = $('#sortierbar').dataTable({
"bJQueryUI": true,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{ "sType": "numeric", "aTargets": [ 3 ] }
],
"aoColumns": [
null, null, null,
{ "sSortDataType": "dom-text", "sType": "numeric" },
null, null, null, null, null, null, null,
null, null, null,
null
]
});
/* Hide the second column after initialisation */
oTable.fnSetColumnVis( 2, false );
/* ENDE -- dataTable */
} );
[/code]
The result i get:
9.774
82.010
8.896
792.010
This discussion has been closed.
Replies
In the Database on this column was the Datatyp "Varchar" and not "Decimal" !!
Now it works fine.