Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82778

fnDeleteRow not deleting correct row when using ScrollInfinite but working with pagination

$
0
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:
$('#example').dataTable({
					"sDom": '<lf<t>ip>',
					"bScrollInfinite": true,
					"bScrollCollapse": true,
					"sScrollY": "200px"	         
				});

I am performing delete operation on clicking on the row as below: (For providing the row as dom I am using get(0))
$(document).on('click','#example tbody tr', function () {
					var dataTable = $('#example').dataTable();
					dataTable.fnDeleteRow($(this).get(0));
				});

When I am initializing the table without scrollinfinite as below then delete row is happening fine
$('#example').dataTable({
					"sDom": '<lf<t>ip>',
					"bScrollInfinite": false,
					"bScrollCollapse": false,
					"sScrollY": "200px"	         
				});

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.

Viewing all articles
Browse latest Browse all 82778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>