473,503 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent GridView from Scrolling to top??

I have this page containing a gridview working well with AJAX. However I
have a GridView in a scrollable Div. If the user has the gird scrolled down
halfway and makes an update to a row, the grid scrolls back up when I do a
databind. How can I keep it in place to preserve the cool AJAX look?
Thanks,
T
Mar 17 '08 #1
2 2857
Hi,

you can keep the scrollTop/yOffset position of the DIV in a form field or
something and restore it on postback.

See:
http://microsoftmiles.blogspot.com/2...sition-in.html
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Tina" <Ti**********@nospamexcite.comwrote in message
news:uR**************@TK2MSFTNGP03.phx.gbl...
>I have this page containing a gridview working well with AJAX. However I
have a GridView in a scrollable Div. If the user has the gird scrolled
down halfway and makes an update to a row, the grid scrolls back up when I
do a databind. How can I keep it in place to preserve the cool AJAX look?
Thanks,
T

Mar 17 '08 #2
I couldn't get it to work.
T
"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi,

you can keep the scrollTop/yOffset position of the DIV in a form field or
something and restore it on postback.

See:
http://microsoftmiles.blogspot.com/2...sition-in.html
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Tina" <Ti**********@nospamexcite.comwrote in message
news:uR**************@TK2MSFTNGP03.phx.gbl...
>>I have this page containing a gridview working well with AJAX. However I
have a GridView in a scrollable Div. If the user has the gird scrolled
down halfway and makes an update to a row, the grid scrolls back up when I
do a databind. How can I keep it in place to preserve the cool AJAX look?
Thanks,
T


Mar 17 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
6816
by: JimO | last post by:
I teach HS computers and one of my kids has a web site with a textbox of info that the user can scroll down and read. The problem is that users can also enter text into it. Is there a way, or a...
4
14920
by: Viken Karaguesian | last post by:
Hello all, Can I prevent something, say a <div>, from scrolling when the page is scrolled? I know that with CSS, "background-attach: fixed" will anchor the background element and prevent it from...
5
4091
by: Diane Truyens | last post by:
Hi, I have a form with textboxes, a search button and a gridview. The textboxes are filled with default values so that the gridview should return all rows but not before the user has had the...
2
2092
by: NH | last post by:
Is it possible to create a gridview control that allows scrolling on the columns. I have a gridview with a list of people names in the first column and the rest of the columns are week dates...
0
1329
by: elegantkvc | last post by:
hi, I want to keep the gridview headers static in Asp.net 2.0 when i was scrolling the elements in all browsers
1
11565
by: Axeman | last post by:
I have an AJAX enabled web form with several data-filled GridView controls. The users accessing this web app will navigate the site via touch-screen monitors (i.e.: no mouse). As a result, I need...
1
1554
by: =?Utf-8?B?U2FuZHBvaW50R3V5?= | last post by:
I want to take a control like the gridview, limiting it to show 5 rows at a time. The source for it has 20 rows of data. I would like the gridview to continously show them, so that every second...
4
2437
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi I am pretty new to asp.net gridviews. I need to get the text in one column to scroll, I have little screen space and one column is normally empty, but is sometimes quite long. Has...
3
24809
by: Jimmy B | last post by:
Hello folks, Does anyone of you know any Open Source GridView Extension that has vertical Scrollbar and fixed Header? Tried to Google but didn't find any proper (because of Css). It should...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7084
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.