Updatepanel - Maintain Panel Scroll Position On Partial Postback?
Mar 13, 2011
I have a gridview that putted in ASP.NET Panel. both of panel and Gridview are in an UpdatePanel. there is a column in gridview that Causes Partial PostBacks. i want to Maintain Panel Scroll position on those postbacks.
I have a fairly tall page (more than 1 screen height) with some checkboxes near the bottom. The checkboxes cause an autopostback which reveals additional controls for the user to interact with. When the postback occurs, the page returns to the top. How can I cause the screen to remain positioned at the original checkbox?
I have an asp.net listbox with 15 rows and auto postback when the selected item is changed. This works as expected but, when the form is re-loaded, IE scrolls the list so that the last selected item is now the top visible item in the list. This produces a confusing/jumpy effect for the users and makes the listbox more difficult to use than it needs to be.
Is there any way to get the list scroll position to stay as it was before the postback? i.e, if I select an item from the middle of the listbox, the listbox is scrolled to the same point after postback.
I have a page that uses AJAX updatepanels. On this page, we have some radio buttons with Autopostback set to true. The problem is that after the postback, the control was losing focus so that when the user would hit tab, control would be restored to the first control on the page and not the drop-down which fired the event. As a fix, I wrote some set focus code in the radio button's oncheckchanged event. This seems to have fixed the problem with the focus. The problem I have is that the browser loses its scroll position every time I click on one of these radiobuttons. Is there a way to maintain scroll position? Maybe there is another way to resolve my original problem of setting focus that will prevent this from happening.
ScrollBar position resets on postback.Is there anyway to maintain position ?I am adding UserControl(s) dynmically to the page, therefore I want to maintian positon (always maintain position at the end)Following is my .aspx file (Just to show where is the asp:panel and User controls)
I have some code which maintains the scroll position inside my panel when I click on a tree view node. So on the selected node change event I have the following:
What this does is maintains the scroll position and a grid view appears. My problem is when I do another postback, for example when I select a link button on the grid view a post back occurs and the scroll position is then lost. How can I stop this happening? Is there a way of seraching for a particular tree node?
I am using VB.NET 3.5 within Visual Studio. I have a form near the bottom of a page that leaps back to the top when i hit submit. I discovered the MaintainScrollPositionOnPostback="true" trick but it only works if there isn't a validation problem.
If i submit the form my validation summary box is populated but the page jumps to the top of the page. Also, not sure if its important/helpful but my form is inside a MultiView.
This scroll position thing is doing my nut to put it frankly. I can see plenty of methods on the net using allsorts of techniques ; HTC Behavior, cookies, hidden form fields, MaintainScrollPosition etc. However, none do exactly as i'd like them to
They all work when a page is loaded for the first time, no problem there at all. It runs the page load and fires the window.onload function client side no worries and all is well in the world. This window.onload does not see to fire on a callback though and my scroll position is lost forever
MaintainScrollPositionOnPostBack only maintains the scroll on the main browser screen so that's not going to do the trick either
So, does anyone know how to maintain the scroll position of a div over a callback? I think i'm nearly there, if only i could fire a client-side method when my UpdatePanel has done it's callback thang. I found the best looking method using cookies Here but, as said above, i can't get the onload function to fire when a callback completes. if i could get the UpdatePanel to do this, i'd be home and dry
I want to maintain the scroll position of a page. So I try to get the page cordinates and set the position on the page load (actually I've a postback in my page) using JS as follows. What I've done is on a client click on an image get the page cordinates and keep in a hidden field.
GetScollerPosition function invoke in an image click event. But it's not work as I expected, the SetScrollPostion always find the value of hidden fields as zero.
When clicking the update button in a formview, if there are validation errors on the page it will jump to the top of the page. Since the validation summary is at the bottom near the update button, is there a way to keep it at the bottom of the page? NOTE: the MaintainScrollPositionOnPostback is set to true but it seems to be ineffective in this case.
I am using usercontrol to populate a web part. The user control consists of ajax tab and in it there is another user control which is a gridview. I add the tabs - My top level usercontrol to the web part. Now when user makes a selection in the gridview (this does a postback) I would like to maintain the scroll position. I tried adding - this.Page.MaintainScrollPositon = true to the page load event of my tabs (priamary) user control. But it does not seem to work. Is there any other way to maintain position in a web part.
I am working on .NET Technologies.In my current project I need one requirement.
What my requirement is , In a webpage I am using a DataGrid for displaying the bulk data.I provided Delete Option for this grid.For clicking on every row of that DataGrid ,I am displaying that row details in a separate panel by using some controls...we can edit this data in that panel..and I am saving that data by using a button control..After saving the data, the datagrid is getting rebinded.
DataGrid has a autoscroll property true .If we are edit a row which is exist in the middle of the grid..after saving that data by using that save button in the panel...what happened is the data grid rebinding and the pointer goes to the first record in the datagrid.....
Can we maintain that scroll position for that datagrid after saving(editing) the data?
I have four controls in a page with update panel.Initially mouse focus is set to first control.when I partially post back the page to server the focus automatically moves to first control from the last focused control from the control I have tabbed down to.Is there any way to maintain the last focus?
I have a gridview which has an edit button. If the edit button is clicked, then textboxes appear that allow users to enter data. The problem is if i scrolldown the gridview and i click the edit button, the page posts back and the scroll position is not maintained.
I have some problems with maintaining scroll position after postback. First time I experienced the problem was when I (believe) added Combobox control from AJAX control Toolkit and/or UpdatePanel from AJAX Extensions. The problem is when I do the postback on the page the page is loaded at the top and not where I did the postback. Actually, this wouldn't be a problem if it isn't happening on a very large form. I have already tried using MaintainScrollPositionOnPostback="true", but it wasn't helpful at all. I can provide the code if needed, but I don't think it would be of any use because I have comboboxes inside update panels which are rebinded on a button click.
I'm working on a page which consists of many sections i.e. the page is divided into many sections. After scrolling down 2-3 section, there is a place where i have to enter a number inside the text box & click "Search". This Textbox & Button is inside a Panel. The problem is after hitting the "Search" button, the code queries to database & do a postback. The page renders with new result but scroll up to the top. I wish to maintain the scroll position back to the Textbox but with new result i.e. after postback. I already tried the below stuff but nothing worked out
Let me walkthrought the scanerio straightaway A "Search page" displays list of all customers. Clicking on a link on each customer page, redirects to the "Customer Detail Page" which is within the application only.When user clicks "Back" button of "Customer Detail Page", the "Search Page" gets displayed with scroll position on top. My requirement is that, I want to the scroll at the same place where it was before user clicked on "Customer Detail Page".