473,654 Members | 3,082 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 2864
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**********@n ospamexcite.com wrote in message
news:uR******** ******@TK2MSFTN GP03.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****@aspalli ance.comwrote in message
news:%2******** ********@TK2MSF TNGP06.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**********@n ospamexcite.com wrote in message
news:uR******** ******@TK2MSFTN GP03.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
6825
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 better control, method, to prevent user from entering text? Thanks, Jim
4
14936
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 scrolling. Is there a similar html/css variable or command that I can apply to a DIV, TABLE, or IMG? Viken K.
5
4119
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 chance to change some of the textboxes and has clicked the search button. How can I avoid the gridview displaying all rows before the search button was clicked? Any Ideas? Thanks Diane
2
2097
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 just showing a certain value for each person for the week. My gridview currenntly shows 10 weeks. But can I fix the person column and allow scrolling on the other columns so you can scroll up to 30 or 40 weeks easily. This is similar to excel in...
0
1336
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
11596
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 an easy way for them to scroll the GridViews when the data is not visible. I want them to click on a button, which will then accordingly scroll the grid up or down. I have tried all the various combinations of the suggestions that I could find: ...
1
1562
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 the "oldest" row leaves and the next roll comes in. Sort of like the stock ticker tape effect, but vertically scrolling rather than horizontal. Doesnt have to be a gridview, its a control Im familiar with, but I can work with others. Is this...
4
2444
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 anybody done this? Can I just put a Marquee into the column to acheive this? if so, how do I do that?
3
24834
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 work in IE, Firefox and Opera. Cheers!
0
8285
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8475
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8591
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2709
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 we have to send another system

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.