Opening RadWindow from User Control, RadWindow loses its properties

5 posts, 0 answers
  1. Simone
    Simone avatar
    34 posts
    Member since:
    Mar 2011

    Posted 27 Jan 2012 Link to this post

    Window is losing its Behaviors, and Width and Height properties
    The window opens with a small size, and all extra buttons, maximize, minimize, etc, which I don't need. I only need the Close button.

    Here's the ascx code:

    <telerik:RadWindowManager ID="RadWindowManagerRepPayments" ShowContentDuringLoad="false" VisibleStatusbar="false"
        ReloadOnShow="true" runat="server" EnableShadow="true" Width="1500px" Height="500px">
            <telerik:RadWindow ID="wndRepPaymentsEdit" runat="server" Behaviors="Close" OnClientClose="OnClientCloseRepPayments"
                Width="1500px" Height="500px" Title="Payment" NavigateUrl="RepPaymentsEdit.aspx">

    Here's the javascript for opening:

    var oWnd = radopen("RepPaymentsEdit.aspx" + "?RepID=" + repID + "&RepPaymentsID=" + id, "wndRepPaymentsEdit");

    Also, if I change the window size, and open it again, it resizes it. I don't want resizing. I just want to be able to open and close it with a specific size.
  2. Simone
    Simone avatar
    34 posts
    Member since:
    Mar 2011

    Posted 27 Jan 2012 Link to this post

    I was able to solve my problem by calling instead of radopen.

    I also had to add a return false; after the call because it was creating the postback and the window was closing immediately. 

    I don't understand why the behavior, it did not happen when I was using radopen  ??? 

    Frustrating problem, and I still don't get it.

    This is the code I ended up with..
    var oWnd = $find("<%= wndRepPaymentsEdit.ClientID %>");
    oWnd.setUrl("RepPaymentsEdit.aspx" + "?RepID=" + repID + "&RepPaymentsID=" + id);;

    OnClientClick="OpenWndRepPaymentsEdit();return false;"
  3. Marin Bratanov
    Marin Bratanov avatar
    5467 posts

    Posted 30 Jan 2012 Link to this post

    Hello Simone,

    The behavior from your first post is most likely related to the presence of more than one RadWindowManager on the rendered page. This scenario is discussed in the following help article: Please examine it carefully, as it will shed some light on the behavior of radopen vs $find().show().

    As for the postback - generally it should be avoided, just as you have noticed. Why it was working before I cannot be certain, but most likely it has been a partial postback (i.e. an AJAX request) that did not dispose the RadWindow you had opened, as it was created by a manager that was outside of the update panel that I assume resides in your UC.

    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
  4. Simone
    Simone avatar
    34 posts
    Member since:
    Mar 2011

    Posted 31 Jan 2012 Link to this post

    Thanks so much for your reply.
    Very helpful.
  5. Lena
    Lena avatar
    1 posts
    Member since:
    May 2011

    Posted 23 May 2013 Link to this post

    Can you please verify what are your setURL and Show functions? I am havin the same issue, I have 2 radwindows in my page and the second one does not have any of the attributes I assign to it in the RadWindowManager

Back to Top