close window from within multipage pageview

3 posts, 0 answers
  1. regina
    regina avatar
    40 posts
    Member since:
    Sep 2012

    Posted 24 Oct 2012 Link to this post

    How can I close a radwindow from within a multipage pageview contenturl content page.
    I have a radwindow that is used like a wizard to add a record and to subscribe to the new record.  I have the entire thing working but the second tab to subscribe does not cause the window to close.  Please help, this is urgent. thanks you.

    below is the code I use when the subscribe is not within the tabstrip/multipage/pageview and it works great, please tell me what i need to add to close from within the tabstrip/multipage/pageview


    function GetRadWindow() {
              var oWindow = null; if (window.radWindow)
                  oWindow = window.radWindow; else if (window.frameElement.radWindow)
                  oWindow = window.frameElement.radWindow; return oWindow;
          }
          
          function CloseModal() {
              // GetRadWindow().close();
              setTimeout(function () {
                  GetRadWindow().BrowserWindow.refreshGrid()
                  GetRadWindow().close();
     
              }, 0);
          }
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5685 posts

    Posted 25 Oct 2012 Link to this post

    Hi,

    If I understand your scenario correctly you have a RadWindow, inside the RadWIndow you have a page with a TabStrip and Multipage. The multipage loads another page and you want to close the RadWindow from inside this last page. If so, then you need the GetRadWindow() and CloseModal() functions in the first page that is directly loaded in the RadWindow and the code to call if from inside the page loaded in the PageView will have to step through the frame hierarchy, i.e. window.parent.CloseModal(). If this is not your case I strongly advise that you send me a simple, runnable project that shows the setup so I can examine it and see what the problem is.


    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. regina
    regina avatar
    40 posts
    Member since:
    Sep 2012

    Posted 25 Oct 2012 Link to this post

    window.parent.closemodal(); worked great, thank you.
Back to Top