How to preserve vertical scroll position after update
How to preserve vertical scroll position after update

I have implemented a table with a checkbox at the beginning of each row. The state of the checkbox controls whether the data in the corresponding row is included in a calculation. The table also allows for vertical scrolling. The problem is that if the table has been scrolled and you click on the checkbox, the resulting submit causes the table to scroll back to the top. Is there a way to prevent this from happening?
Before Clicking on the Checkbox
After Clicking on the checkbox
Answers
Hi @seiser01 ,
Could you please link to a test case or link to your page so that we can see the issue? Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Thanks,
Sandy
Unfortunately, I cannot create a link to a test case. The page is hosted on a fileserver that is behind a firewall and is not externally accessible.
I simply want to store the scroll position of my datatable and then restore it after a submit. Will save State accomplish this for me?
I wonder why the table is scrolling after you click the checkbox? Maybe you can build a simple test case showing us what you are doing so we can offer suggestions. It doesn't need to replicate everything just needs to be enough so we can see your checkbox and your click event and of course the scrolling after the click event.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin