Unwanted change of sorting when resizing the window

Unwanted change of sorting when resizing the window

majkeljumajkelju Posts: 3Questions: 0Answers: 0
edited January 2013 in Bug reports
I open the table in a new window. I sort the data via SQL, so I got initial sorting set to false, sorting on all columns forbidden, but when I grab the edge of the window and I start to resize it, the datatables change the sorting of the data. I searched the documentation but with no result. Is this some sort of bug or am I doing something wrong?

Replies

  • allanallan Posts: 63,381Questions: 1Answers: 10,449 Site admin
    Please link to a test case: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
  • majkeljumajkelju Posts: 3Questions: 0Answers: 0
    edited January 2013
    Sorry...I can´t post full working test case because of the data being loaded from the database and so on...I hope that simple code will be enough...
    btw: In this case it seems that table is against my will sorted according the "Cena [Kč]" column.

    this is how I open a new window with the table:
    [code] function displayCalculation(){
    $("#modalCalc").load('./safe/kalkulace_CalcVzorec.php?k_polozka=<?echo $k_polozka;?>').dialog({modal:false, title:'Kalkulační vzorec', width:"auto", height:"auto"});
    }[/code]
    HTML table:
    [code]
    echo '';
    echo '

    Typ potřeby
    Cena [Kč]
    Procent

    ';
    while($row = $result->fetch_assoc()){

    echo ''.$row['popisTypu'].'';
    echo ''.number_format($row['mnozstvi'],'2','.',' ').'';
    echo ''.number_format($row['mnozstvi']/($celkMnozstvi/100),'2','.',' ').'';
    }
    echo '';
    [/code]

    DataTable script:
    [code]
    iHeight = tableCalc.offsetHeight;

    var oTable;
    $(document).ready(function(){
    oTable = $('#tableCalc').dataTable({
    "bJQueryUI": true,
    "sDom": '<"H"f>rtS<"F"i>',
    "sScrollY": iHeight+50,
    "bFilter": false,
    "bAutoWidth": true,
    "aaSorting":[],
    "bSorted": true,
    "bPaginate": false,
    "bRetrieve":true,
    "aoColumns": [
    { "sClass": "odsazeni", "sType": "czech", "bSortable":false,"sSortableNone": "ui-state-default" },
    { "sClass": "odsazeni", "sType": "natural", "bSortable":false,"sSortableNone": "ui-state-default" },
    { "sClass": "odsazeni", "sType": "natural", "bSortable":false,"sSortableNone": "ui-state-default" }

    ]
    });
    });
    [/code]
  • majkeljumajkelju Posts: 3Questions: 0Answers: 0
    Still nothing? :(
  • allanallan Posts: 63,381Questions: 1Answers: 10,449 Site admin
    edited February 2013
    As I said I need a test case showing the problem so I have at least a chance of fixing it. http://live.datatables.net and JS Fiddle are two resources to use if you can't host a page on a server.

    As far as I'm aware from your code it should work fine.

    Allan
This discussion has been closed.