0

I have 2 pages (Home and Сategory) Load page Home on there's button. Click button run panel RadWindow (NavigateUrl: Сategory).

protected void ShowWindow()
    {
        string script = "function f(){$find(\"" + RadWindow_editor.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
    }
    protected void RadButtonEdit_Click(object sender, EventArgs e)
    {
        ShowWindow();
    }

Load RadWindow NavigateUrl - Сategory on there's button. Click button close RadWindow.

protected void RadButtonEdit_Click(object sender, EventArgs e)
        {
            ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "Close();", true);
        }
 function GetRadWindow() {
     var oWindow = null;
     if (window.radWindow)
         oWindow = window.radWindow;
     else if (window.frameElement.radWindow)
         oWindow = window.frameElement.radWindow;
     return oWindow; 
 }

 function Close() {
     var oWindow = GetRadWindow();
     oWindow.argument = null;
     oWindow.close();
     return false;
 }

How to refresh the page Home? (Click button close RadWindow)

Thank you!

Cristian Lupascu
  • 39,078
  • 16
  • 100
  • 137
itprodavets
  • 69
  • 3
  • 9

2 Answers2

0

There are client-side events like OnClientBeforeClose and OnClientClose.
http://demos.telerik.com/aspnet-ajax/window/examples/clientsideevents/defaultcs.aspx
and check this link, it gives you an idea.
How to close the radwindow on serverside and refresh the parent page

You should also look at using a RadAjaxManager in the parent page to send the window events to the parent as shown in the the following demo: Grid and Window. It focuses on refreshing a grid, not a page in your instance, but the concept of sending events to the parent page remains the same.

Community
  • 1
  • 1
Kadir
  • 3,094
  • 4
  • 37
  • 57
0

Here's how: http://www.telerik.com/community/forums/aspnet-ajax/window/how-to-refresh-the-page-click-button-close-radwindow.aspx#2894238.

If your page does not refresh, then the problem is in the page. Having a has in the URL can cause this problem. Make sure you change the URL so you have a fresh GET request.

rdmptn
  • 5,413
  • 1
  • 16
  • 29