How to retain scrollbar position even after reloading using javascript

After clicking on any lower check box in the grid the vertical scrollbar position changed to top level in the grid. How to keep the vertical scrollbar in same position after reloading the grid.?

after clicking on any checkbox the grid will be empty and it’s reload again .

this.grid.empty();

I have tried for keeping scroll position on same position using localstorage & session storage get setItem, but it didn’t work.