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

radWindow

6 Answers 81 Views
Window
This is a migrated thread and some comments may be shown as answers.
udi
Top achievements
Rank 1
udi asked on 01 Jul 2009, 01:13 PM
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 

6 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Jul 2009, 01:19 PM
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.
0
udi
Top achievements
Rank 1
answered on 02 Jul 2009, 06:36 PM
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
0
Shinu
Top achievements
Rank 2
answered on 03 Jul 2009, 07:24 AM
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
0
Georgi Tunev
Telerik team
answered on 03 Jul 2009, 08:17 AM
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.
0
udi
Top achievements
Rank 1
answered on 04 Jul 2009, 03:44 PM
thanks,
 i will open a ticket  
0
Georgi Tunev
Telerik team
answered on 06 Jul 2009, 07:12 AM
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.
Tags
Window
Asked by
udi
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
udi
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or