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

When adding a row to a vertically scrolling table, can I keep the state of the scrollbar?

$
0
0
I am using "sScrollY": 300 in a table
(So basically http://datatables.net/release-datatables/examples/basic_init/scroll_y.html)
and I am adding data to it clientside using fnAddData. If I have scrolled down a few rows in the table so that the top row is not visible and add a row with fnAddData it scrolls to the top.

If, on that page, you were to scroll down in the table a bit and then run
$('#example').dataTable().fnAddData(['zot','baz','bar','foo','SPROING'])
You'll see the table scroll to the top.

Is there a way to prevent this? Any help would be appreciated.


Cheers,
Ivar

Viewing all articles
Browse latest Browse all 81677

Trending Articles



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