Hi,
I am using RadWindow as ContentTemplate and in the Content Template I am using a Custom UserControl to do some functionality. In my Default Page, I have a RadWindow which also has a UserControl as ContentTemplate. When this window Opens the user can click a button to open another RadWindow with UserControl as Content Template. Now in this User Control I do some things and then I want to close the window. I can register a startup script from server side to call a CloseWindow javascript function. But the problem is that I can't get the reference of the RadWindow using the GetRadWindow() function, which is used on the content pages to get the reference of the radWindow. But this function does not give me the reference to the Rad window.
Here is a sample of how i am using most of my RadWindows:
I am not using any ScriptManager or AjaxManager, or RadWindowManager on any of my pages. I only use AjaxPanel to wrap all my user Controls. then I use these User Controls in the RadWindow's ContentTemplate. and i open the window from server side by setting the Visible on Page Load property to TRUE.
Is there a way to Close the RadWindow, which is used as a Content Template and the Content is a User Control, from with in the UserControl Code? I have tried GetRadWindow() method but it does not work. then I also tried the following:
but as I am not using any WindowManager so this also did not work. and This code is run on the Page where the RadWindow is defined and not inside the Content.
Any help will be appriciated.
/MO
I am using RadWindow as ContentTemplate and in the Content Template I am using a Custom UserControl to do some functionality. In my Default Page, I have a RadWindow which also has a UserControl as ContentTemplate. When this window Opens the user can click a button to open another RadWindow with UserControl as Content Template. Now in this User Control I do some things and then I want to close the window. I can register a startup script from server side to call a CloseWindow javascript function. But the problem is that I can't get the reference of the RadWindow using the GetRadWindow() function, which is used on the content pages to get the reference of the radWindow. But this function does not give me the reference to the Rad window.
Here is a sample of how i am using most of my RadWindows:
<
telerik:RadWindow
ID
=
"rw_EditObjectRecordScreen"
runat
=
"server"
Modal
=
"true"
Behaviors
=
"Close, Move, Resize "
Width
=
"900px"
Height
=
"500px"
Visible
=
"true"
OnClientClose
=
"CloseEditObjectRecordWindowODR"
DestroyOnClose
=
"true"
>
<
ContentTemplate
>
<
uc1:EditObjectRecord
ID
=
"EditObjectRecord1"
runat
=
"server"
/>
</
ContentTemplate
>
</
telerik:RadWindow
>
I am not using any ScriptManager or AjaxManager, or RadWindowManager on any of my pages. I only use AjaxPanel to wrap all my user Controls. then I use these User Controls in the RadWindow's ContentTemplate. and i open the window from server side by setting the Visible on Page Load property to TRUE.
Is there a way to Close the RadWindow, which is used as a Content Template and the Content is a User Control, from with in the UserControl Code? I have tried GetRadWindow() method but it does not work. then I also tried the following:
function GetContentRadWindow() {
//using ContentTemplate instead of Navigate URL
//for RadWindow so we need to get RadWindow by name
var oWnd = GetRadWindowManager().getWindowByName("RadContentWindow");
return oWnd;
}
Any help will be appriciated.
/MO