fnUpdate sorting problem

fnUpdate sorting problem

maczormaczor Posts: 4Questions: 0Answers: 0
edited January 2012 in DataTables 1.8
Hi, I'm not so great in JS so the problem might be lame, nevertheless it's important for me to solve it and I was looking for solution with no luck.

I'm updating one row of the table using JQ.get and fnUpdate together with fnStandingRedraw for pagination friendly redraw.

Problem is that every updated row is at the end of the sorting order.

Please help.

[code]
JQ.get('forms/person_list_row_html.php?id='+id, function() {

oTable.fnUpdate(rowdata, aPos[0], 0, false);
oTable.fnStandingRedraw();

},"script");
[/code]

Replies

  • maczormaczor Posts: 4Questions: 0Answers: 0
    I have misjudged the problem.
  • maczormaczor Posts: 4Questions: 0Answers: 0
    So it's even more weird then I thought at first. Some columns sort well and some not.
    It's really important to me to solve this.

    This td sorts wrong after update (it's 5th column). All updated rows goes to the end of the table and then sorts well against eachother:
    [code]

    Whatever is here goes to the end of table

    [/code]

    This td sorts well after update (it's 7th column):
    [code]
    Whatever is here sorts well

    H

    [/code]

    Initialization is here:
    [code]
    oTable = JQ('#person_list_table').dataTable({
    "sCookiePrefix": "<?=$operator_id?>_datatable_",
    "sPaginationType": "full_numbers",
    "sDom": 'Rlripft',
    "bLengthChange": true,
    "bPaginate": true,
    "oColReorder": {
    "iFixedColumns": 1
    },
    "aoColumnDefs": [
    { "sType": "datemodified-iso", "aTargets": [ 0 ] }
    ],
    "sScrollX": "100%",
    "sScrollY": JQ('#pageWrapper').height() - JQ('.list thead').height()-26,
    "bAutoWidth": true,
    "bSortCellsTop": true,
    "bFilter": true,
    "iDisplayLength": 50,
    "oLanguage": {
    "oPaginate": {
    "sFirst": "Pierwsza",
    "sLast": "Ostatnia",
    "sNext": ">>",
    "sPrevious": "<<"
    },
    "sInfo": "_START_ - _END_ z _TOTAL_",
    "sLengthMenu": 'Pokaż '+
    '10'+
    '25'+
    '50'+
    '100'+
    'Wsz.'+
    '',
    "sEmptyTable": "Brak kandydatów",
    "sInfoEmpty": "Pusty wynik",
    "sInfoFiltered ": "wyszukane z _MAX_",
    "sSearch": "Szukaj:",
    "sZeroRecords": "Pusty wynik"
    },
    "bStateSave": true,
    "iCookieDuration": 356*60*60*24,
    "bProcessing": true,
    "bSortClasses": false
    });
    [/code]

    Updating looks like that:
    [code]
    JQ.get(web_folder+'forms/person_list_row_html.php?id='+id, function() {

    oTable.fnUpdate(rowdata, aPos[0], 0, false);
    oTable.fnStandingRedraw();

    },"script");
    [/code]
This discussion has been closed.