fnDeleteRow not deleting correct row when using ScrollInfinite but working with pagination
fnDeleteRow not deleting correct row when using ScrollInfinite but working with pagination
vinaybvk
Posts: 3Questions: 0Answers: 0
Hi,
I am having issue with fnDeleteRow, it is not deleting the correct row when using infinite scroll but working fine when using pagination.
My table initialization:
[code]
$('#example').dataTable({
"sDom": '',
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": "200px"
});
[/code]
I am performing delete operation on clicking on the row as below: (For providing the row as dom I am using get(0))
[code]
$(document).on('click','#example tbody tr', function () {
var dataTable = $('#example').dataTable();
dataTable.fnDeleteRow($(this).get(0));
});
[/code]
When I am initializing the table without scrollinfinite as below then delete row is happening fine
[code]
$('#example').dataTable({
"sDom": '',
"bScrollInfinite": false,
"bScrollCollapse": false,
"sScrollY": "200px"
});
[/code]
Is there any extra configuration do I need to do for delete while using scroll infinite.
JSFiddle link of the example: http://jsfiddle.net/vinaybvk/LBkuY/
Thanks,
Vinay.
I am having issue with fnDeleteRow, it is not deleting the correct row when using infinite scroll but working fine when using pagination.
My table initialization:
[code]
$('#example').dataTable({
"sDom": '',
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": "200px"
});
[/code]
I am performing delete operation on clicking on the row as below: (For providing the row as dom I am using get(0))
[code]
$(document).on('click','#example tbody tr', function () {
var dataTable = $('#example').dataTable();
dataTable.fnDeleteRow($(this).get(0));
});
[/code]
When I am initializing the table without scrollinfinite as below then delete row is happening fine
[code]
$('#example').dataTable({
"sDom": '',
"bScrollInfinite": false,
"bScrollCollapse": false,
"sScrollY": "200px"
});
[/code]
Is there any extra configuration do I need to do for delete while using scroll infinite.
JSFiddle link of the example: http://jsfiddle.net/vinaybvk/LBkuY/
Thanks,
Vinay.
This discussion has been closed.
Replies
I would suggest removing the infinite scrolling option.
Allan
Thanks,
Vinay.