Ancored in Page after open Modal using RadWindowManager

4 posts, 0 answers
  1. Fábio
    Fábio avatar
    3 posts
    Member since:
    Mar 2011

    Posted 27 Apr 2012 Link to this post

    Hi,
    I have a problem, when i close a Modal using  RadWindowManager the page that contains the definition of RadWindowManager   back to the beginning of the page (lost the anchor) .

    how can I solve this??

    thank you,

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5811 posts

    Posted 02 May 2012 Link to this post

    Hello Fábio,

    Do you have some custom client-side handlers attached to the RadWindow or RadWindowManager? Are you performing and AJAX request when closing the RadWindow? If so the scrolling would come from the default MS AJAX behavior and more details about persisting the scroll position are available in the net, e.g. via this google search. Usually setting the MaintainScrollPositionOnPostback property of the Page to true solves this.

    I am asking this because by itself the RadWIndow does not modify the page like this. The following markup works fine with me:
    <asp:ScriptManager ID="Scriptmanager1" runat="server" />
    <telerik:RadWindowManager runat="server" ID="rwm1" Modal="true"></telerik:RadWindowManager>
    <div style="height: 800px;"></div>
    <asp:Button ID="Button1" Text="open a RadWindiow" OnClientClick="radopen(); return false;" runat="server" />

    And you can see my test here: http://screencast.com/t/44oYkSbdfOF.

    Kind regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Fábio
    Fábio avatar
    3 posts
    Member since:
    Mar 2011

    Posted 08 May 2012 Link to this post

    Hi, thank you for example, but, i use:

    <telerik:RadWindowManager ID="rwmModalFiltroCiclo" runat="server" OnClientClose="OnClientClose">
            <Windows>
                <telerik:RadWindow ID="DialogWindowCiclo" Behaviors="Close" ReloadOnShow="false"  
                    BackColor="Gray" Modal="true" runat="server" Width="500px"
                    NavigateUrl="Con_CicloVida.aspx" OnClientClose="OnClientClose"  ShowContentDuringLoad="false"
                    Title="Selecionar Infração para Ciclo de Vida" VisibleStatusbar="false">
                </telerik:RadWindow>
            </Windows>
      </telerik:RadWindowManager>

    in event OnClose i return one parameter of Modal for parent page and in this moment refresh the ancor.
    the page is moving to location, but, back to start of page.
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5811 posts

    Posted 10 May 2012 Link to this post

    Hello Fábio,

    What happens if you remove this custom functionality from the OnClientClose event? Is it the origin of the behavior? If so - I'd advise that you debug your code and see why it behaves like this. I can only be guessing, but it is possible that you are giving focus to an element at the top of the page which can cause some browser to scroll this element into view.


    Regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top