Close Radwindow and refresh page

3 posts, 0 answers
  1. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 19 Mar 2014 Link to this post

    I have followed this code before and for different things I was doing it worked fine.  But in this situation I am stumped on how to tie it all in.  On my radwindow close when I press the x i wna the window to close and then the page to refresh.  I tried calling the close window function inside the pagerefresh but it doe snot work.  I can call one or the other  but not both.  If I just call the pageRefresh it leaves a white space on page before it refreshes and looks tacky, So I figure if I can close it then refresh the page it should looke good.
    <telerik:RadWindowManager ID="rwManager" runat="server" CenterIfModal="true" Modal="true" Animation="FlyIn" Behaviors="Close" Skin="Web20"  ReloadOnShow="true" VisibleStatusbar="false" OnClientClose="RefreshParentPage">
                  <Windows>
                      <telerik:RadWindow ID="rwdelete" runat="server" NavigateUrl="~/MAC/Delete.aspx" Width="600px" Height="300px" ShowContentDuringLoad="false"></telerik:RadWindow>
                      <telerik:RadWindow ID="rwChange" runat="server" NavigateUrl="~/MAC/Change.aspx" Width="800px" Height="600px" ShowContentDuringLoad="false"></telerik:RadWindow>
                      <telerik:RadWindow ID="rwNew" runat="server" NavigateUrl="~/MAC/NewUser.aspx"></telerik:RadWindow>
                  </Windows>
              </telerik:RadWindowManager>
     
     
     
    function GetRadWindow() {
               var oWindow = null;
               if (window.radWindow) oWindow = window.radWindow;
               else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
               return oWindow;
           }
     
           function closeWindow() {
               var oWnd = GetRadWindow();
               oWnd.close();
           }
     
           function RefreshParentPage() {
               document.location.reload();
           }






  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Mar 2014 in reply to Kevin Link to this post

    Hi Kevin,

    Please have a look into this article which deals the same scenario. Let me know if you have any concern.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 21 Mar 2014 in reply to Shinu Link to this post

    <telerik:RadWindow ID="rwdelete" runat="server" NavigateUrl="~/MAC/Delete.aspx" Width="600px" Height="300px" ShowContentDuringLoad="false" CssClass="rwWindowContent" OnClientClose="RefreshParentPage"></telerik:RadWindow>
    Hi Shinu,

    they are posting back from server side, which i do in so situations and it works great.  In this one I am just closing the existing radWindow via the x on the radwindow,   I do not need the postback buttons bacuas eof hte way the page works, but i need the radgrid on the main page to refresh after i close the window.  I put tired the example on the page and it is how I have it except for the last statement.  I change it but it still dow not refresh the page, it closes the window but no refresh.  If I just call the refreshpage with out closing the window it does it but it leaves a window that is white before it refreshes and looks tacky.




    function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
     
            function closeWindow() {
                var oWnd = GetRadWindow();
                oWnd.close();
            }
     
            function RefreshParentPage() {
                GetRadWindow().BrowserWindow.location.reload();
            }



Back to Top