Duplicate records appended to DataTables on redrawing while bScrollInfinite property is used
Duplicate records appended to DataTables on redrawing while bScrollInfinite property is used
ashis82
Posts: 6Questions: 0Answers: 0
Duplicate records (the last 10 visible records) appended to DataTables each time when I am redrawing the table using the below code
Redrawing Datatables
--------------------------
myExample .fnDraw(false);
If I remove the false parameter, duplication is not found but scrollbar is moving to top.
My Requirement
-------------------
I want to redraw the datatables with the scrollbar @ the existing location.
NOTE: "bScrollInfinite" and "bServerSide" is true.
If I removed the property "bScrollInfinite" then data duplication is not found.
Here is my configuration:
-------------------------------------------------
$(document).ready( function (){
var myExample = $('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": "300px",
"sAjaxSource": "scripts/server_processing.php"
});
});
Does anybody knows why is this problem occurs?
I would appreciate if anybody has the solution with working examples.
Thanks in advance
Redrawing Datatables
--------------------------
myExample .fnDraw(false);
If I remove the false parameter, duplication is not found but scrollbar is moving to top.
My Requirement
-------------------
I want to redraw the datatables with the scrollbar @ the existing location.
NOTE: "bScrollInfinite" and "bServerSide" is true.
If I removed the property "bScrollInfinite" then data duplication is not found.
Here is my configuration:
-------------------------------------------------
$(document).ready( function (){
var myExample = $('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": "300px",
"sAjaxSource": "scripts/server_processing.php"
});
});
Does anybody knows why is this problem occurs?
I would appreciate if anybody has the solution with working examples.
Thanks in advance
This discussion has been closed.
Replies
Yes, you are using fnDraw(false) with server-side processing enabled and infinite scrolling. To be honest I would suggest you don't use infinite scrolling in DataTables - it is a feature I am considering dropping as it is not a good solution and has too many holes in it. Indeed, I am not likely to fix any issues in it at the moment.
I would suggest you use `fnDraw()` (no false with server-side processing) and Scroller.
Allan
when i use the "sScrollY" the header will duplicate whit one of this is able to order collums. the another is useless, in fact it scoll whit che main content of the table.
i've solve it using this code putting it in the "fnDrawCallback" section
$('.dataTables_scrollBody thead').remove();
after this i found another problem.
the header visible doesn't see the box in which it has been put
now i'm using the "paginate" mode because i don't fine any alternative solution
i hope i was clear, sorry for my english
cheers