refresh single row without miss scroll and apply render

refresh single row without miss scroll and apply render

oscaroxyoscaroxy Posts: 9Questions: 0Answers: 0

I create in js a table from a list (_myListData = new Array()):

...
...

I put this table by js into DOM, after I set a datatable by js:

$('#table').DataTable( {
"scrollCollapse": true,
"paging": false,
"order": [[ 0, "desc" ]],
"searching": false,
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
var bg;
bb = getColorBk(aData[13], aData[14], aData[15], $(nRow).hasClass('even') );
if (bb.bg != ''){
$('td', nRow).css('background-color', bb.bg).css('border-bottom', '1px solid '+bb.brd).css('border-right', '1px solid '+bb.brd);
}
}
} );

All it's right!
After I change, by js, a value into _myListData (once value into once row) I would refresh only once row, so I don't miss the position of the scroll ( for instance I'm changing in the middle table a value).

I don't understand how refresh the row without to miss the position scroll and put on the render (row color).

I tried:

table.fnUpdate
table.fnDraw(), with true, false, page
table.row( 0 ).data(av).draw(true)

but nothing... don't work fine, my result:

  • refresh all table I miss position of the scroll
  • update single cell but don't apply render
  • don't update row

help my please
thanks

This discussion has been closed.