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

Access parent page

2 Answers 215 Views
Window
This is a migrated thread and some comments may be shown as answers.
eric
Top achievements
Rank 1
eric asked on 03 Jun 2009, 12:29 AM
Is it possible to access public propertys on the parent page of a rad window?  When I say parent page I mean the page that contains the rad window.  When not using Radwindows I do the following...

Dim

 

parPage As MyPage= Me.Parent

I could send the values to the radwindow but it seems like there should be a way to get the values directly from the parent.  Any thoughts?

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 03 Jun 2009, 12:28 PM
Hi Eric,

When working with RadWindow, you are working with an IFRAME (the control is basically an IFRAME and behaves just like one. Since in such scenario you have 2 different pages, e.g. parent and content one, you cannot directly access the controls in the parent page from within the content page. That is why we have provided a rich client-side API (check the Programming section of RadWindow's documentation) that will allow you to work with the controls on the client, via JavaScript. For example you could get a reference to the corresponding control and take some arguments on the client in the content page and then - to sent them to the server via a postback or RadAjax's ajaxRequest.


Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Keith
Top achievements
Rank 1
answered on 01 Jun 2010, 06:53 PM
The document in the RadWindow is in an IFRAME, you should be able to get to objects in the parent page through 

top.document or window.parent.document

for example

top.document.getElementById("name of element")

or

window.parent.document.getElementById('name of element')

Keith E.

Tags
Window
Asked by
eric
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Keith
Top achievements
Rank 1
Share this question
or