aaSorting not work

aaSorting not work

projektmceprojektmce Posts: 9Questions: 4Answers: 0

Hi,
I use the datatable vbersion 1.10.11 in a intranet project (so I can't give you a link). I try to set a default sort on a special col. But it doesn't work. The default sort is everytime at col 1. What make I wrong?

    dTable = $('#uebersicht').DataTable({
        //
        "bDestroy":true,
        "cache":false,
        "ajax":{
            "url":"liste.php",
            "type":"Post"
            },
        "bSort":true,
        "aaSorting":[[2,'desc']],
        "bStateSave":false,
        "bProcessing":false,
        "bDeferRender":true,
        "bAutoWidth":false,
        "sPaginationType":"full_numbers",
        "sDom":'<"top"ilfpr>t<"clear">',
        "sScrollY":tabellenhoehe,
        "sScrollX":"100%",
        "iDisplayLength":25,
        "aLengthMenu":[
            [10, 25, 50, 100, -1],
            [10, 25, 50, 100, "Alle"]
            ],
        "oLanguage":{
            "sUrl":"sprachen/dataTables.german.txt"
            },
        "aoColumnDefs":[{
            "bSearchable":true,
            "bVisible":true,
            "aTargets":[0]
            }],
        "aoColumns":[
            {"mData" : "Produkt"},
            {"mData" : "ID"},
            {"mData" : "KVNr", sWidth : "70px", "sClass" : "col_align_center"},
            {"mData" : "Liefertermin", sWidth : "70px", "sClass" : "col_align_center"},
            {"mData" : "Filiale", sWidth : "50px", "sClass" : "col_align_center"},
            {"mData" : "AB", "sClass" : "col_align_center"},
            {"mData" : "Avis", "sClass" : "col_align_center", "sType" : "german_date"},
            {"mData" : "WeDatum", "sClass" : "col_align_center", "sType" : "german_date"},
            {"mData" : "PosNr", "sClass" : "col_align_center"},
            {"mData" : "Kaufpreis", "sClass" : "col_align_right"},
            {"mData" : "Kundenname"},
            {"mData" : "PLZ", sWidth : "70px", "sClass" : "col_align_center"},
            {"mData" : "Lieferort"},
            {"mData" : "Lieferhinweis", sWidth : "150px"},
            {"mData" : "Team", "sClass" : "col_align_center"},
            {"mData" : "Einstufung", "sClass" : "col_align_center"},
            {"mData" : "Material", "sClass" : "col_align_center"},
            {"mData" : "Montagedauer", "sClass" : "col_align_center"},
            {"mData" : "LieferErläuterung"}],
        "fnInitComplete" : function(){
            //
            //    Produktspalte ausblenden
            //
            this.fnSetColumnVis(0, false);
            },
        });

Answers

  • projektmceprojektmce Posts: 9Questions: 4Answers: 0

    I found the mistake on an other place. I was a little bit blind :-)

This discussion has been closed.