Parent Code
01.
<%@ Page Language=
"C#"
AutoEventWireup=
"true"
CodeBehind=
"Starter.aspx.cs"
Inherits=
"WebWindows.Starter"
%>
02.
03.
<%@ Register assembly=
"Telerik.Web.UI"
namespace=
"Telerik.Web.UI"
tagprefix=
"telerik"
%>
04.
05.
<!DOCTYPE html>
06.
07.
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
08.
<head runat=
"server"
>
09.
<title></title>
10.
11.
<script type=
"text/javascript"
>
12.
function
clientShow(sender, eventArgs)
13.
{
14.
var
txtInput = document.getElementById(
"txtInput"
);
15.
sender.argument = txtInput.value;
16.
}
17.
function
clientClose(sender, args)
18.
{
19.
if
(args.get_argument() !=
null
)
20.
{
21.
txtInput.value = args.get_argument();
22.
}
23.
}
24.
</script>
25.
26.
27.
</head>
28.
<body>
29.
<form id=
"form1"
runat=
"server"
>
30.
<telerik:RadScriptManager ID=
"RadScriptManager1"
runat=
"server"
>
31.
<Scripts>
32.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.Core.js"
>
33.
</asp:ScriptReference>
34.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.jQuery.js"
>
35.
</asp:ScriptReference>
36.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.jQueryInclude.js"
>
37.
</asp:ScriptReference>
38.
</Scripts>
39.
</telerik:RadScriptManager>
40.
<telerik:RadAjaxManager ID=
"RadAjaxManager1"
runat=
"server"
>
41.
</telerik:RadAjaxManager>
42.
<div>
43.
44.
<telerik:RadWindow ID=
"RadWindow1"
runat=
"server"
Height=
"600px"
Modal=
"True"
Width=
"800px"
NavigateUrl=
"Childform.aspx"
OnClientClose=
"clientClose"
OnClientShow=
"clientShow"
OpenerElementID=
"showDialog"
ReloadOnShow=
"True"
>
45.
</telerik:RadWindow>
46.
<br />
47.
<telerik:RadDockLayout ID=
"RadDockLayout1"
Runat=
"server"
>
48.
<telerik:RadDockZone ID=
"RadDockZone1"
Runat=
"server"
Height=
"300px"
Width=
"1220px"
>
49.
<telerik:RadDock ID=
"RadDock10"
Runat=
"server"
Height=
"136px"
Width=
"1182px"
>
50.
<ContentTemplate>
51.
<br />
52.
<br />
53.
<br />
54.
55.
56.
57.
</ContentTemplate>
58.
</telerik:RadDock>
59.
</telerik:RadDockZone>
60.
</telerik:RadDockLayout>
61.
62.
<asp:TextBox ID=
"txtInput"
runat=
"server"
></asp:TextBox>
63.
<asp:Button ID=
"showDialog"
runat=
"server"
OnClientClick=
"clientShow"
Text=
"Open"
/>
64.
65.
<br />
66.
67.
</div>
68.
</form>
69.
</body>
70.
</html>
Child page code :
01.
<%@ Page Language=
"C#"
AutoEventWireup=
"true"
CodeBehind=
"ChildForm.aspx.cs"
Inherits=
"WebWindows.ChildForm"
%>
02.
03.
<%@ Register assembly=
"Telerik.Web.UI"
namespace=
"Telerik.Web.UI"
tagprefix=
"telerik"
%>
04.
05.
<!DOCTYPE html>
06.
07.
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
08.
<head runat=
"server"
>
09.
<title></title>
10.
11.
<script type=
"text/javascript"
>
12.
13.
function
pageLoad() {
14.
15.
txtInput = document.getElementById(
'txtUserInput'
);
16.
var
currentWindow = GetRadWindow();
17.
txtInput.value = currentWindow.argument;
18.
19.
20.
}
21.
22.
23.
function
GetRadWindow() {
24.
var
oWindow =
null
;
25.
if
(window.radWindow)
26.
oWindow = window.radWindow;
27.
else
if
(window.frameElement.radWindow)
28.
oWindow = window.frameElement.radWindow;
29.
return
oWindow;
30.
}
31.
32.
33.
34.
35.
//Close the dialog and return the argument to the OnClientClose event handler
36.
function
returnArg() {
37.
38.
var
oWnd = GetRadWindow();
39.
oWnd.close(txtInput.value);
40.
}
41.
42.
</script>
43.
44.
45.
46.
47.
</head>
48.
<body>
49.
<form id=
"form1"
runat=
"server"
>
50.
<div>
51.
52.
53.
54.
55.
56.
<asp:ScriptManager ID=
"ScriptManager1"
runat=
"server"
OnLoad=
"Page_Load"
>
57.
</asp:ScriptManager>
58.
59.
<asp:TextBox ID=
"txtUserInput"
runat=
"server"
></asp:TextBox>
60.
<br />
61.
<br />
62.
<asp:Button ID=
"Button1"
runat=
"server"
Text=
"Close With Argument"
OnClientClick=
"returnArg(); return false;"
/>
63.
<br />
64.
65.
66.
67.
68.
69.
70.
71.
</div>
72.
</form>
73.
</body>
74.
</html>
** The code working perfect if Textbox and Button outside RadDock Control, But inside doesn't work?
Check attached video files.
Thanks
Vmax