Preserve Scrolling Position On Panel On Postback

Jan 11, 2010

I have a panel inside an update panel. The panel has a scrollbar. When a control inside the panel is clicked, the scrollbar resets, scrolling the panel back to the top. Is there a simple way to preserve the scrolling position of a panel inside and update panel when a postback happens from inside that panel?

View 5 Replies


Similar Messages:

Web Forms :: Preserve Scroll Position Of DIV On PostBack

Feb 28, 2014

I have implemented the "slimScroll" in a div.  Prior to this implementation, I was using the asp.net inherent scrolling and was able to use the Maintain Scroll PositionOnPostback="true" at the Page level and that worked well; but now, this no longer works. 

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SBN_Messages.aspx.vb"
Inherits="ShopBuyName_Test_Site.SBN_Messages" MaintainScrollPositionOnPostback="true" %>
<%@ Register Assembly="obout_Interface" Namespace="Obout.Interface" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

[code]....

View 1 Replies

Web Forms :: Panel - Scrolling Position Centered

Feb 9, 2010

I have a asp .net panel with scrollbar enabled .The panel contains buttons which is dynamically added to the panel. Is there any way to keep panel scrollbar position centered.

<asp:Panel
ID="pnlYear"
ScrollBars="Vertical"
runat="server"
Height="460"
></asp:Panel>
pnlYear.Controls.Add(GetYearName());
private
Table GetYearName ()
{
Table tblYear =
new Table();
tblYear.ID = "tblYear";
for (int i = 1900; i <
DateTime.Now.Year; i++)
{
Button btnYear =
new Button();
btnYear.Text = i.ToString();
TableRow rw =
new TableRow();
TableCell cell =
new TableCell();
cell.Controls.Add(btnYear);
rw.Cells.Add(cell);
tblYear.Controls.Add(rw);
}
return tblYear;
}

View 8 Replies

Returning Focus (Position) In Panel After PostBack?

Mar 8, 2010

VWD 2008 Express. Visual Basic.

I have a gridview control within a panel control. The gridview can contain up to 128 rows. The panel is 300px high and has a vertical scroll bar that allows me to scroll to the row I want to see or edit in my gridview. When I click the "Edit" button on an item within my gridview, the page posts back and returns to panel scrolled all the way back to the top. I have to then scroll back down to get to the item I want to edit in my gridview (which has correctly been placed in edit mode). How can I make the panel return to its postion (or stay in its postion) after a postback without me having to manually scroll back down?

View 8 Replies

Web Forms ::maintain ScrollBars Position In Asp:Panel On Postback?

Mar 30, 2010

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)

[Code]...

View 5 Replies

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.

View 1 Replies

Stop Scrolling At One Position Only

Feb 14, 2011

I have a grid at the bottom of my website. There is an image button that addas a new row to the grid but as i click the image button the scrolling moves to the top disturbing the focus of the page. How can i stop the scrolling at one position only.

View 5 Replies

Web Forms :: Nested GridView Position Fixes When Scrolling?

Sep 27, 2010

I have a gridview with a nested gridview, the nested gridview exoands on the click of a button driven by some java

the parent gridview is in a panel with virtical scroll bar enabled.

In the development area I can expand a nested gridview and scroll down and it will travel with the parent in the correct position.

When published the nested gridview has a fixed position and wontn scroll with the parent.

View 1 Replies

Infragistics UltraWebGrid - Grids Position Fixed And Are Not Scrolling With Page?

Aug 4, 2010

I have two grids on a page that seem to always be position:fixed.I want them to scroll with the page when an overflow scrollbar appears on the body. The grids however ALWAYS stay in the same place and don't scroll with the rest of the page content.Is there any way to get an UltraWebGrid to be relative and scroll up the page with the rest of the page's content?This seems to work in IE6 but not in IE8.

View 1 Replies

Javascript - Window Scrolling Button Control - Rendering To Normal Position

Nov 9, 2010

In web application, i tried scrolling the window vertically by increasing a y axis height to 500 with a javascript that is attached to OnClientClick event of a asp.net button control with id Button1. The script i have used is

<script language="JavaScript">
function scrollToWindow()
{
window.scrollTo(0,500);
}
</script>

and the button code is as follows

<asp:Button ID="Button1" runat="server"
Text="Scroll to bottom" OnClientClick="scrollToWindow()" />

If i run this page and click that button, the page scroll is not working properly. when i put alert inside that script and debug, i found that the page is actually scrolling to 0,500 but again its rendering to its normal position because of some reasons. Overcome this issue and let me know the reason behind that?

View 3 Replies

Scrolling - JQuery Technique To Select All The Page Controls/divs With A Non-zero Scrollbar Position?

Sep 9, 2010

Is there a jQuery technique to select all the page controls/divs with a non-zero scrollbar position?

I'm trying to solve a problem faced by many; essentially after a partial asp.net postback all the controls/divs that had a scrollbar with a non-zero value (ie: were scrolled down to some position) are reset to the zero (top of the scrollbar).

My approach is to have a jQuery script save all the scrollbar positions for all the controls/divs contained on a page and after the postback, restore all the scroll bar positions.Is it possible, can it even work? If it is, how do I use jQuery to select all the divs with scrollbars and then save those positions.

View 2 Replies

Web Forms :: Preserve DataTable Across PostBack In Application

Feb 18, 2013

In asp.net(C#) using a popwidnow i am to hold  some values in dummy table after that dummy table's value and rest form values needed to be added in database. How to proceed with that?

View 1 Replies

Web Forms :: Create Scrolling Buttons On Panel

Sep 2, 2010

how to create a scroll boxes inside pabel c#

View 3 Replies

How To Preserve The Index And Make Sure The TabContainer And The TabPanel Is Loaded At Postback

Mar 26, 2010

At first time page load the TabContainer and TabPanel is shown where the default tab index is zero. This panel has some user controls and a "Go" button. The "Go" button loads a GridView is a separate panel. So far things ar good.

Now when I either sort or page throught the GridView, the TabContainer disappears. I read somewhere that the current tab index would be preserved during post back. So how can I preserve the index and make sure the TabContainer and the TabPanel is loaded at postback and still have the information originally entered by users in the controls? Could I use a "Session" variable?

View 3 Replies

C# - Preserve TableCell BackColor Seted On Client Side On Postback

Feb 28, 2010

What is the best way to save BackColor of asp:Tabel TableCell set on client side by javascript on posback ?

What property do I override while creating custom control based on Table ?

View 1 Replies

AJAX :: Maintain State Of FileUpload Control And Preserve File Across PostBack

May 7, 2015

My <input id="FileUpload1" name="FileUpload1" type="file"> and country dropdown both are inside update panel , now on selectedindexchanged it do postback , which i am triggering in update panel to avoid page refresh .

Now the problem is when i select any image in fileupload and then select country , my selectedimage vanishes but its path stays in textbox .

View 1 Replies

Data Controls :: Preserve (Retain) Background Color Of DropDownList Item On PostBack

May 7, 2015

I have a dropdown populated with data , based on a true / false condition i change the dropdown item color when dropdown gets loaded initially the item color are proper based on condition. but if i select a particular item & then again click on dropdown the item color disappear show to retain the item color.

View 1 Replies

Forms Data Controls :: Using Panel Control For Scrolling GridView Rows

Aug 13, 2010

I put a GridView control in a Panel control so that the GridView's rows can be scrolled vertically. With selection of row enabled for a Button field, I am able to select any row with the selected row background color highlighted. Problem is when you scroll down to a row that is way pass the Panel height and select the row, after postback the GridView will render to show the top rows which are visible within the Panel height. So the selected row in it's background color cannot be seen.

View 3 Replies

Web Forms :: Providing Vertical Scrolling To Page In Postback Event?

Feb 27, 2010

I am using gridview in my aspx page. In that i have placed questions and related link button with text viewAnswer.Bellow that gridview i have olaced a lable . When i click on viewanswer the answer apear on lable. but here i want that the user can view lable at first sight. for that how can i provide dynamic verticle scroll to my page target as lable..

View 1 Replies

How To Remain Scroll Position Of A Panel

Aug 24, 2010

I have a panel, inside a panel there are some checkbox and radiobuttonlist. This panel is place inside an UpdatePanel ajax.

When I click on a checkbox, it will raise autopostback with ajax supported, then the scrollbar of the panel always move back to the first position. It does not keep the current scrolling position.

How could I remain the scrollbar position?

I already have tried to add:

this.Page.SetFocus("PanelTrips");
this.MaintainScrollPositionOnPostBack = true;

View 1 Replies

Web Forms :: Change Position Panel

Mar 26, 2016

I have component panel1 in the form width=600 heigt=300. But i want change position panel. Always panel be i center form.

View 1 Replies

AJAX :: Drag Panel Position When It Opens?

Apr 14, 2010

I am a designer prototyping applications. At the moment I want to show in my prototype that a drag panel opens and it belongs to a tab.

Two questions: How can I make a drag panel belong to a tab?

Should that be too complicated code wise (i am a designer - not a developer...): Can I position the drag panel on opening for the first time?So far, my drag panel always opens in the top left corner in my browser. I tried positioning it with CSS but it just ignores that.

View 1 Replies

VS 2005 How To Keep Position Of Postback In A Scrollbar

Sep 10, 2010

I have a simple question. I need to keep my position af postback in a scrollbar, where a panel consists of 20 equal user controls. I have attached the code below for the simple form and for the user control.

I have added MaintainScrollPositionOnPostback="true" in the webform, but still the position moves back to the top position of the panel after postback.

View 31 Replies

C# - Maintaining Scroll Position After Postback?

Feb 19, 2011

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.

View 1 Replies

Web Forms :: How To Set Position For Panel Like Left=50px; Top=100px

Feb 10, 2011

How to set position for panel like left=50px; top=100px?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved