RadWindow - reopens during page postback ..

2 posts, 0 answers
  1. FISCAL
    FISCAL avatar
    91 posts
    Member since:
    May 2010

    Posted 10 Aug 2011 Link to this post

    Hi,

    I am having a problem with RadWindow control. On the click of server side button control, radwindow is opened which is fine. User closes it. When Page Postback happens, it automatically opens which is undesirable. How can I get rid of this behaviour?

    Code Snippet - Html Source...

    <telerik:RadWindowManager ID="ExclusionWindow" runat="server" Skin="Office2007" Width="500"
            Height="400" Visible="true">
        </telerik:RadWindowManager>
    ..................


    Code behind ..


     protected void btnSetExclusion_Click(object sender, EventArgs e)
            {
                if (Master == null) return;
                Label lblPortfolio = (Label)Master.FindControl("lblPortfolioID");
                int orgID = Convert.ToInt32(lblPortfolio.Text);
                RadWindow window = new RadWindow()
                {
                    ID = "Exclusion Window",
                    VisibleOnPageLoad = true,
                    NavigateUrl = "frmCMExclusions.aspx?OrgID=" + orgID,
                    Modal = true,
                    DestroyOnClose = true,
                    Behaviors = WindowBehaviors.Close
                };
                ExclusionWindow.Visible = true;
                ExclusionWindow.Windows.Add(window);
                ExclusionWindow.DestroyOnClose = true;
            }


    Many thanks.

    Milan G



  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4625 posts

    Posted 12 Aug 2011 Link to this post

    Hi Milan,

    This is the expected behavior when you set the VisibleOnPageLoad property to true - the RadWindow should reopen after every postback. What you can do is to open it correctly - via JavaScript, which is the way a RadWIndow should be opened, as it is a client-side object. You can do this by injecting the JavaScript from the server-side. More information on the available approaches can be found in the following article: http://www.telerik.com/help/aspnet-ajax/radwindow-troubleshooting-javascript-from-server-side.html.


    Greetings,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top