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

Prevent postback when minimizing/restoring a radwindow

4 Answers 143 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 15 Dec 2011, 10:38 PM
Hi,

I have a RadWindowManager and open up RadWindows client-side through the manager control.
I'm not sure if I set a property wrong or what, but minimizing/restoring a radwindow causes the page inside the radwindow to postback.
Maximizing/restoring, moving, resizing the radwindow does not postback.  Only minimize/restore causes a postback.

The only client event I have on the RadWindowManager is OnClientBeforeClose
This is the manager:
<telerik:RadWindowManager ID="RadWindowManagerParent" runat="server" Animation="None" OffsetElementID="wrapper"
    MinimizeZoneID="DivMinimizeZone" RestrictionZoneID="TdContent" EnableTheming="true"
    AnimationDuration="250" DestroyOnClose="true" EnableShadow="true" IconUrl="~/Images/Blue/Window_Icon.png"
    PreserveClientState="true" ShowContentDuringLoad="false" ShowOnTopWhenMaximized="false"
    Width="1000" Height="650" VisibleStatusbar="false" ReloadOnShow="true" KeepInScreenBounds="false"
    Style="z-index: 2501;" Behaviors="Close,Maximize,Minimize,Move,Reload,Resize"
    OnClientBeforeClose="RadWindowManagerParentOnClientBeforeClose">
    <Windows>
    </Windows>
</telerik:RadWindowManager>

Any ideas?

Thanks!!!

4 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 16 Dec 2011, 08:33 PM
Sam:

Take a look at this forum thread. It should help you here.

Opening Rad Window Causes Postback

Cheers.
0
Sam
Top achievements
Rank 1
answered on 13 Jan 2012, 09:17 PM
Sorry for the delayed response.  We got a new email server at work and all telerik emails have been going to my junk mail.

Thanks for the link, but the asker was opening RadWindows from the server-side.

And Georgi's 2 options were to use a RadAjaxManager or wire up the opening client-side.

Notice the first sentence of my post:
"I have a RadWindowManager and open up RadWindows client-side through the manager control."

So I'm already opening the RadWindows using a client-side javascript function.

Any other ideas?

Thanks!!!
0
Accepted
Marin Bratanov
Telerik team
answered on 17 Jan 2012, 02:09 PM
Hello Sam,

What I can suggest at his point is that you remove the MinimizeZoneID property. Its functionality requires that the RadWindow markup is moved in the DOM which inevitably causes an iframe to reload. You can reproduce this behavior with the following simple code:
<asp:Button ID="Button1" Text="move first" OnClientClick="moveIframe(); return false;" runat="server" />
<asp:Button ID="Button2" Text="move second" OnClientClick="moveBackIframe(); return false;" runat="server" />
<div id="rootDiv" style="width: 500px; height: 500px; border: 1px solid green;"></div>
<iframe id="myframe" src="content.aspx"></iframe>
<div id="nextdiv"></div>
 
<script type="text/javascript">
    function moveIframe()
    {
        var myframe = $get("myframe");
        myframe.parentNode.removeChild(myframe);
        var rootDiv = $get("rootDiv");
        rootDiv.appendChild(myframe);
    }
 
    function moveBackIframe()
    {
        var myframe = $get("myframe");
        myframe.parentNode.removeChild(myframe);
        var nextdiv = $get("nextdiv");
        nextdiv.appendChild(myframe);
    }
</script>

Similar behavior can be achieved by combining a RadWindow with RadTabStrip to create a desktop-like environment, you can check out an example in this online demo.

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
Sam
Top achievements
Rank 1
answered on 20 Jan 2012, 08:52 PM
Thanks Marin; removing the minimize zone id stopped the postbacks!
Tags
Window
Asked by
Sam
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Sam
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or