opening a new window from an open window

7 posts, 0 answers
  1. Kevin
    Kevin avatar
    58 posts
    Member since:
    May 2009

    Posted 02 Jun 2009 Link to this post

    Hi how would i open a new window from an existing open window i have the following code but all i get is an ie8 popup message box and the windows doesnt open
    1 RadWindow newwindow = new RadWindow();  
    2             newwindow.ID = "RadWindow10";  
    3             newwindow.Width = 800;  
    4             newwindow.Height = 600;  
    5             newwindow.NavigateUrl = "Repair.aspx?Propref=" + property.PROPREF;  
    6             newwindow.VisibleOnPageLoad = true;  
    7             newwindow.Skin = "WebBlue";  
    8             RadWindowManager1.Windows.Add(newwindow); 
    1 <asp:Button ID="btnRepairs" runat="server" Text="Book Repair" onclick="btnRepairs_click" /> 
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 03 Jun 2009 Link to this post

    Hi Kevin,

    The code that you posted is OK and the RadWindow should be displayed after a postback. Could you please post here the rest of your page's code?

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

    Posted 03 Jun 2009 Link to this post

    Just a quick follow-up:
    Try adding the RadWindow in the Controls collection of the RadWindowManager as well.
    e.g.

    RadWindow newwindow = new RadWindow();   
    newwindow.ID = "RadWindow10";   
    newwindow.Width = 800;   
    newwindow.Height = 600;   
    newwindow.NavigateUrl = "Repair.aspx?Propref=" + property.PROPREF;   
    newwindow.VisibleOnPageLoad = true;   
    newwindow.Skin = "WebBlue";   
    RadWindowManager1.Windows.Add(newwindow);  
    RadWindowManager1.Controls.Add(newwindow);  



    Sincerely yours,
    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.
  4. Kevin
    Kevin avatar
    58 posts
    Member since:
    May 2009

    Posted 03 Jun 2009 Link to this post

    i have added that code but now im getting an access denied when i try to run the button that calls the code also can i acctually call a new window from an open one?
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 Jun 2009 Link to this post

    Hi Kevin,

    In such case, please open a support ticket and send me your project so I could check it. Thank you in advance for your cooperation.

    As for your last question, yes, this is possible by using the client-side API - check the following help article for more details:
    http://www.telerik.com/help/aspnet-ajax/window_programmingopeningfromwithin.html


    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.
  6. Kevin
    Kevin avatar
    58 posts
    Member since:
    May 2009

    Posted 04 Jun 2009 Link to this post

    Hi Georgi

    thank you for your reply it has been very helpful one final question can this be done server side as we are currently calling the new window server side?

    Many thanks
  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 Jun 2009 Link to this post

    Hello Kevin,

    If you want to open the second RadWindow on the parent page (as shown in the help article that I posted earlier), you could do that only on the client - the content and parent pages are two separate documents and you cannot access one from another on the server.

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