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

Rad window close,refreshing parent window.

1 Answer 85 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rama
Top achievements
Rank 1
Rama asked on 22 Jun 2012, 07:53 AM
Hello All,

I am opening a rad window in the asp.net grid row command . It is working properly .

codebase:
in the command:
  Telerik.Web.UI.RadWindow objwindow = new Telerik.Web.UI.RadWindow();

                    objwindow.VisibleOnPageLoad = true;
                    objwindow.NavigateUrl = "~/OfferManagement/CreateCounterOffer.aspx?OfferId=" + _commandArg;
                    double heightwinc = 400;
                    double widthwinc = 900;
                    objwindow.Height = new Unit(heightwinc);
                    objwindow.Width = new Unit(widthwinc);
                    pnlradData.Controls.Add(objwindow);

in the aspx page:

<asp:Panel ID="pnlradData" runat="server"></asp:panel>


The issue is, I want to refresh the parent window after closing that  dynamically created "objwindow"(rad window) . I searched across the google but I didn't find a correct solution for it.Can I add any event? Please help me.

Thanks

Rama.M


1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 Jun 2012, 09:04 AM
Hi Rama,

You can hook the OnClientColose to the RadWindow and refresh the page using document.location.reload().

C#:
Telerik.Web.UI.RadWindow objwindow = new Telerik.Web.UI.RadWindow();
objwindow.VisibleOnPageLoad = true;
objwindow.OnClientClose = "RefreshParentPage";
objwindow.NavigateUrl = "~/OfferManagement/CreateCounterOffer.aspx?OfferId=" + _commandArg;
double heightwinc = 400;
double widthwinc = 900;
objwindow.Height = new Unit(heightwinc);
objwindow.Width = new Unit(widthwinc);
pnlradData.Controls.Add(objwindow);

JS:
<script type="text/javascript">
    function RefreshParentPage()//function in parent page
    {
        document.location.reload();
    }
</script>

This function should be placed in the parent page - where your RadWindow / RadWindowManager is.

Hope this helps.

Thanks,
Princy.
Tags
Window
Asked by
Rama
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or