This is a migrated thread and some comments may be shown as answers.

Ancored in Page after open Modal using RadWindowManager

3 Answers 61 Views
Window
This is a migrated thread and some comments may be shown as answers.
Fábio
Top achievements
Rank 1
Fábio asked on 27 Apr 2012, 08:48 PM
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,

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 02 May 2012, 02:23 PM
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.
0
Fábio
Top achievements
Rank 1
answered on 08 May 2012, 07:51 PM
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.
0
Marin Bratanov
Telerik team
answered on 10 May 2012, 03:57 PM
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.
Tags
Window
Asked by
Fábio
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Fábio
Top achievements
Rank 1
Share this question
or