Sorting numeric with .

Sorting numeric with .

AKraisserAKraisser Posts: 6Questions: 0Answers: 0
edited January 2011 in General
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

Replies

  • AKraisserAKraisser Posts: 6Questions: 0Answers: 0
    Oh sorry !!

    In the Database on this column was the Datatyp "Varchar" and not "Decimal" !!
    Now it works fine.
This discussion has been closed.