保持DIV滚动条位置 [英] Maintain DIV scrollbar position

查看:142
本文介绍了保持DIV滚动条位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...

我正在使用div获取gridview的垂直滚动条.为此,我将div的滚动样式设置为style ="overflow".自从我使用计时器刷新gridview以来,我就将div放在了更新面板中.

一切正常,除了滚动条未保持其位置.在每次回发中,滚动条都将移动到初始位置.

我已经尝试了许多javascript代码来解决此问题,但仍然没有解决.如果有人知道如何解决此问题,请帮助我.

谢谢和问候

Nidhin

Hi...

I''m using a div to get vertical scrollbar for the gridview. For that i made the scroll style of div as style="overflow". I have placed the div in an update panel since i''m refreshing the gridview using a timer.

Everything works fine except the scrollbar is not maintaining it''s position. In every postback the scrollbar is moving to the initial position.

I have tried many javascript codes to solve this problem, but still it not solved. If anyone knows how to solve this please help me..

Thanks and regards

Nidhin

推荐答案

您需要使用PageRequestManager DOM对象在客户端进行此操作.

您去了:
在更新面板内部维护GridView滚动位置和标题 [
You need to use PageRequestManager DOM object to do it on client side.

Here you go:
Maintain GridView Scroll Position and Header Inside Update Panel[^]


这篇关于保持DIV滚动条位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆