Scrolling a Div programatically using say Javascript
Posted
by SARAVAN
on Stack Overflow
See other posts from Stack Overflow
or by SARAVAN
Published on 2010-05-20T15:25:48Z
Indexed on
2010/05/20
15:50 UTC
Read the original article
Hit count: 266
Hi I have a jqgrid which is embedded in a Div. I am deleting records from the grid and reloading the grid using grid.Trigger('reload'). The width of the grid is considerably high so it has a scroll bar. Now I scrolled through the end of the grid horizontally before deleting records. Each time I delete the records and reload the grid, the column headers and their values are slightly misaligned. When I move the scroll bar back to original position or just move the scroll bar slightly they are aligned properly.
So I thought its better to move the scroll bar to its inital position when the grid reloads. How can a scroll bar be programatically moved using javascript. Or is there any other way to solve my problem?
© Stack Overflow or respective owner