postback of page inside window scrolls parent to top

0 Answers 0 Views
Window
Cheryl
Top achievements
Rank 1
Iron
Cheryl asked on 21 Jan 2026, 08:27 AM

Hello

I have a page that is ajaxed using Ajax Manager.  There is a RadWindow on the page which uses navigateurl rather than contenttemplate to show a page within the site (so not an external URL)

That page also has AjaxManager on it.  When an ajaxed field within the window is changed the page does a partial postback correctly (and updates whatever it needs to do on itself) however the scroll position of the parent page scrolls to the top.

How do I stop that from happening?

I note that I am using this to scroll back to the window on window load because on opening the window it would scroll to the top as well

  function fnRadWindowPageLoad() {
                if (modalPopUpScrollPositionObj != null)
                    window.scrollTo(modalPopUpScrollPositionObj.XCoordinate(), modalPopUpScrollPositionObj.YCoordinate());
            }

 

I'm using this to open the window in the code behind, after I've done some processing

Dim sbScript As New System.Text.StringBuilder()

        'This needs the Sys.Application.Load event, as the button performs a full postback, thus disposes the entire user control, as well as the page
        sbScript.Append("function f(){")
        sbScript.Append("var oWnd = $find('" & RadWindowSearchFilter.ClientID & "');")
        sbScript.Append("oWnd.show();")
        sbScript.Append("Sys.Application.remove_load(f);")
        sbScript.Append("}")
        sbScript.Append("Sys.Application.add_load(f);")
        ScriptManager.RegisterStartupScript(Page, Me.GetType(), "key", sbScript.ToString(), True)

No answers yet. Maybe you can help?

Tags
Window
Asked by
Cheryl
Top achievements
Rank 1
Iron
Share this question
or