fnUpdate sorting problem
fnUpdate sorting problem
maczor
Posts: 4Questions: 0Answers: 0
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]
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]
This discussion has been closed.
Replies
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]