Modal Parent Window ID

9 posts, 0 answers
  1. Andrew
    Andrew avatar
    125 posts
    Member since:
    Sep 2008

    Posted 24 Mar 2009 Link to this post

    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?
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 26 Mar 2009 Link to this post

    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.
  3. Andrew
    Andrew avatar
    125 posts
    Member since:
    Sep 2008

    Posted 26 Mar 2009 Link to this post

    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
  4. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 31 Mar 2009 Link to this post

    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.
  5. Andrew
    Andrew avatar
    125 posts
    Member since:
    Sep 2008

    Posted 31 Mar 2009 Link to this post

    thanks, i will give this a try
  6. Andrew
    Andrew avatar
    125 posts
    Member since:
    Sep 2008

    Posted 01 Apr 2009 Link to this post

    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
  7. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 02 Apr 2009 Link to this post

    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.
  8. Andrew
    Andrew avatar
    125 posts
    Member since:
    Sep 2008

    Posted 02 Apr 2009 Link to this post

    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?
  9. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 06 Apr 2009 Link to this post

    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.
Back to Top