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

Modal Parent Window ID

8 Answers 127 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Veteran
Iron
Andrew asked on 24 Mar 2009, 05:31 PM
I have a Modal Window (A) that opens another Modal Window (B) that opens another Modal Window (C),

how can I get refrence to a parent model window from a child model window.

so how can (C) get refrence to (B) without knowing the radwindowID is there a way to find the radwindow ID of the parent window the child window was opened from?

8 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Mar 2009, 12:33 PM
Hello Andrew,

Are you opening the windows one from within other? If all created RadWindows are on the main page, you could easily get a reference to a particular RadWindow from the parent page. You can see this approach in action in the following demo: Returning Values from a Dialog.

Best wishes,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Andrew
Top achievements
Rank 1
Veteran
Iron
answered on 26 Mar 2009, 12:55 PM
yes I am opening the radwindows from with a modal radwindow. I have no idea what order the windows will open so I need to be able to find the randwindowid of the parent window from its child window.

also I do no define any radwindows on the page just the manager, and all windows are givin a Guid as an id when opened so they will be unique. in your example tou know the name of the parent window but I do not. the only way I have found was to pass the parent window id on the querystring to the child page but I though there must be a way with your javascript library to find the id of the page that opened the child window
0
Fiko
Telerik team
answered on 31 Mar 2009, 11:06 AM
Hi Andrew,

I implemented the desired functionality in a simple project and attached it to this thread.
I hope this helps.

Kind regards,
Fiko
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Andrew
Top achievements
Rank 1
Veteran
Iron
answered on 31 Mar 2009, 03:36 PM
thanks, i will give this a try
0
Andrew
Top achievements
Rank 1
Veteran
Iron
answered on 01 Apr 2009, 05:50 PM
I am getting a js error in this method: GetParentRadWindow()

on line: var parentRadWindow = parentBrowserWindow.GetRadWindow();

error: Object doesn't support this property or method
0
Fiko
Telerik team
answered on 02 Apr 2009, 10:35 AM
Hi Andrew,

Could you please provide more information about the error?:
  • Do you get the error when you run my project as is or after any changes in my project? If you did, could you please provide the more information about your setup?
  • in which page the error occurs - ( Default.aspx, Popup1.aspx ...) ?
  • could you please provide the reproduction steps?

The provided project demonstrates the approach that you can use in order to get the reference to the parent RadWindow ( and then you could get its ID). Please note that the first opened RadWindow ( that contains the Popup1.asp page) does not have a parent RadWindow (its parent window is the browser's window).

Greetings,
Fiko
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Andrew
Top achievements
Rank 1
Veteran
Iron
answered on 02 Apr 2009, 02:06 PM
I have taken the code that you sent me made some small changes to it is like what we are doing,  and it does not work.
how can I send this back to you?
0
Fiko
Telerik team
answered on 06 Apr 2009, 10:38 AM
Hello Andrew,

You need to open a new support ticket - you cannot attach files in the forums.

Regards,
Fiko
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Andrew
Top achievements
Rank 1
Veteran
Iron
Answers by
Georgi Tunev
Telerik team
Andrew
Top achievements
Rank 1
Veteran
Iron
Fiko
Telerik team
Share this question
or