Maintain Scroll Bar position of a div within a gridview after a PostBack

前端 未结 4 454
一向
一向 2021-02-04 20:43

I used the following piece of code in the web.config in order to maintain the scrollbar position after a server postback:



        
4条回答
  •  再見小時候
    2021-02-04 21:29

    You can do what you want, but it will need to be done client-side with something like jQuery. The following tutorial uses jQuery to determine the value of the scrollbar within your GridView control and then restore that value every time the $(document).ready function is called. In this manner your scroll bar will be reset to it's position before the postback as you wish.

    Easily maintaining scroll position in GridView using jQuery

提交回复
热议问题