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

Close a window opened using ContentTemplate

2 Answers 32 Views
Window
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 31 May 2011, 05:33 PM
I have a 'regular' RadWindow, one populated using the NavigateUrl property (we'll call this Window1).

The page that is used to populate it, however, includes a RadWindow (which we'll call Window2) with a <ContentTemplate> tag.

When the user clicks a button in Window1, Window2 opens. I want to be able to manually close Window2 when the user clicks a button in it, and have the user return to operating in Window1.

I tried just saying "GetRadWindow().close(), but that closed both Window2 and Window1.

Any suggestions?

-- 
Stuart

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 02 Jun 2011, 11:10 AM
Hi Stuart,

GetRadWindow() is used to get a reference to the RadWindow object from within a content page. If you are using content templates, you need to get a reference to the window object by using $find() or for example, a global variable, set in one of the window's events - OnClientShow, OnClientPageLoad or when opening that window.


All the best,
Georgi Tunev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Stuart Hemming
Top achievements
Rank 2
answered on 02 Jun 2011, 12:28 PM
Thanks Georgi, I'll give that a shot.

-- 
Stuart
Tags
Window
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Stuart Hemming
Top achievements
Rank 2
Share this question
or