radWindow

7 posts, 0 answers
  1. udi
    udi avatar
    3 posts
    Member since:
    Jan 2009

    Posted 01 Jul 2009 Link to this post

    hi,

    i opened rad window, in this window i have controls etc'.
    now, one of the control is button or hyperLink and when i push the button i want to see the result in the parent window no in the current radWindow, and i want to destroy the current window.

    some one can help me, how to do this.

    thanks in advance,
    Udi 
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 Jul 2009 Link to this post

    Hello Udi,

    I believe that the following KB article will be of help:
    http://www.telerik.com/support/kb/aspnet-ajax/window/radwindow-that-postbacks-and-manipulates-opener-page-on-its-reload.aspx



    All the best,
    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. udi
    udi avatar
    3 posts
    Member since:
    Jan 2009

    Posted 02 Jul 2009 Link to this post

    hi,
    first, thanks for the answer.
    i tried what you sent, and it doesent help me,

    you can send me small program with radwindow that related to aspx page with some controls,
    let say that when i push a button in the radWin i
     see a result on the aspx page that related to the radWin, but in the parent page, 
    thanks
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Jul 2009 Link to this post

    Hi Udi,

    It is possible to call any function that is defined in parent window, by obtaining a reference to a RadWindow component. Try the following code snippet.

    ASPX for Parent window:
     
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" > 
    </telerik:RadWindowManager> 
    <input id="Button4" type="button" value="button"  onclick="openWin();"/> 
     
    <script type="text/javascript"
    function openWin() 
        var ownd = window.radopen('Window.aspx', 'Win'); // Opening window 
        ownd.center();   
    function CallFn(value) 
        //Show the result in parent page with passed value from radwindow 
    </script> 

    ASPX for RadWindow:
     
    <input id="Button1" type="button" value="button" onclick="callParentFunction();" /> 
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
    <script type="text/javascript"
    function callParentFunction() 
        var text = document.getElementById('TextBox1'); 
        var value = text.value; // Value to be passed to parent page 
        GetRadWindow().BrowserWindow.CallFn(value);  // call function in parent page 
         
    function GetRadWindow() // for getting reference to a RadWindow component 
      var oWindow = null
      if (window.radWindow) 
         oWindow = window.radWindow; 
      else if (window.frameElement.radWindow) 
         oWindow = window.frameElement.radWindow; 
      return oWindow; 
    }   
    </script> 
    Checkout the link to know more about Calling Functions in Windows.

    -Shinu
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 03 Jul 2009 Link to this post

    Hi Udi,

    I don't know what exactly is your scenario, but I assume that you wish to communicate from the content to the parent page via codebehind. If this is so, note that this is not possible - the content and the parent page are completely different pages and the communication between them is done on the client with JavaScript. If you want the content to be on the same page as the parent (e.g. to work with it in the codebehind of the parent page) I recommend to try RadToolTip or RadDock.

    If this is not what you want, I recommend to implement the desired logic not by using RadWindow, but a standard browser's popup (window.open()) or an IFRAME (RadWindow is basically an IFRAME). Once you have your logic working as expected, the same approach will work with RadWindow as well.
    If your code is working fine with popup / IFRAME but you experience problems converting it to use RadWindow, open a support ticket and send us the working project. We will check it and rework it for you.


    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.
  6. udi
    udi avatar
    3 posts
    Member since:
    Jan 2009

    Posted 04 Jul 2009 Link to this post

    thanks,
     i will open a ticket  
  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 06 Jul 2009 Link to this post

    OK Udi,

    Just make sure that the project can be run locally - we will check it right away.


    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