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

close window from within multipage pageview

2 Answers 31 Views
Window
This is a migrated thread and some comments may be shown as answers.
regina
Top achievements
Rank 1
regina asked on 24 Oct 2012, 09:35 PM
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 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 25 Oct 2012, 03:55 PM
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.
0
regina
Top achievements
Rank 1
answered on 25 Oct 2012, 03:59 PM
window.parent.closemodal(); worked great, thank you.
Tags
Window
Asked by
regina
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
regina
Top achievements
Rank 1
Share this question
or