RadWindow Issue

2 posts, 0 answers
  1. Lokesh
    Lokesh avatar
    89 posts
    Member since:
    Jul 2012

    Posted 14 Dec 2010 Link to this post

    Hi Team,
    I am having trouble when opening the popup (i.e. radwindow) from server side.
    On client side of parent page, I have :

    <div id="RestrictionZone" class="module" style="margin-top: 4px; height: 300px; width: 400px;">
      <telerik:RadWindowManager ID="RadWindowManager1" runat="server" style="z-index:7001">
        <telerik:RadWindow runat="server" ID="RadWindow1" ReloadOnShow="true" ShowContentDuringLoad="true" Modal="true" Height="620px" Width="620px" NavigateUrl="ManageStatusChange.aspx"  />

    and On button click event, I want to open radwindow from server side.
    This is what I have on server side.

    protected void btnStatus_Click(object source, EventArgs e)
    StringBuilder oStringBuilder = new StringBuilder();
                     .Append("&SessionString=" + Session["SessionString"] + "&EntityType=COABudgetSecondaryEntity");
    OpenModalDialog(this, "Msg", "Key", oStringBuilder.ToString());
    Session["SessionString"] = null;
    public void OpenModalDialog(System.Web.UI.Page ObjPage, string strMsg, string strKey, string url)
                string strScript;
                Type jsType = ObjPage.GetType();
                ClientScriptManager CS = ObjPage.ClientScript;
                strScript = "javascript:window.radopen(\"" + url + "\",); return true";
                /*System.Web.UI.ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "btnStatus_Click", strScript, true);*/
    Telerik.Web.UI.RadWindow newwindow = RadWindow1;
                newwindow.ID = "RadWindow1";
                newwindow.Height = 620;
                newwindow.Width = 620;
                newwindow.NavigateUrl = url;
                newwindow.VisibleOnPageLoad = true;
                newwindow.RegisterWithScriptManager = true;

    I also have AjaxRequestDelegate on Parent page .

    protected void Page_Load(object sender, EventArgs e)
    RadAjaxManager rjxManager = RadAjaxManager.GetCurrent(this);
                //Create a new delegate to handle the AjaxRequest event   
                rjxManager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(rjxManagerBudgetEntity_AjaxRequest);
                rjxManager.AjaxSettings.AddAjaxSetting(rjxManager, aspPanel_ProjectBudget);
      protected void rjxManagerBudgetEntity_AjaxRequest(object sender, AjaxRequestEventArgs e)
                if (e.Argument == "Rebind")
                    Session["currentObject"] = null;

    On my Popup page I have a button, which after clicking saves the data and also has some script that will fire my ajax request delegate on Parent page.

    On my aspx side of Popup, I have :

    function closeRadWindow()   
     function CloseAndRebind(args) 

    And on server side button click Event, I have :

    protected void btnSave_Click(object sender, EventArgs e)
     COABudgetDetails = Request.QueryString["SessionString"].ToString().Split(',');
                        for (int i = 0; i <= COABudgetDetails.Length - 1 && !string.IsNullOrEmpty(COABudgetDetails[i]); i++)
                            //Retrive Entity Key for Bdgeting else passing the object.
                            if (mEntityID == GlobalConstants.COA_BUDGET_SECONDARY_ENTITY_ID)
                                mCOABudgetDetailID = Convert.ToInt32(COABudgetDetails[i]);
                            StatusChangeHistory AllStatusChangeHistory = GetStatusChangeHistory();
                            StatusChangeHistoryEntry AnStatusChangeHistoryEntry = AllStatusChangeHistory.GetItem(mStatusChangeHistoryID);
                            DoSaveStatus(AllStatusChangeHistory, AnStatusChangeHistoryEntry);
    string script = "<script>CloseAndRebind('Rebind')</" + "script>";
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "CloseAndRebind", script, false); 

    My popup opens fine. But my problem is that, when I click save button of Popup, it saves the data, goes to parent page, fires the ajax request, and instead of closing, it reopens itself 3 times.
    I dont know where I am going wrong.
    Could you please help me out ?

  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 16 Dec 2010 Link to this post

    Hello Lokesh,

    At this point I can suggest (it's a shot in the dark though) to try setting EnableViewState=false for the RadWindowManager that you are using. If it doesn't help, please open a support ticket and send us a sample project that reproduces your exact setup and the problem itself. This way we will get a better view over your exact scenario and we'll be able to provide you with the most appropriate solution.

    Best wishes,
    Georgi Tunev
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top