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

Open User Control in RAD Window?

5 Answers 176 Views
Window
This is a migrated thread and some comments may be shown as answers.
AlphaVegas
Top achievements
Rank 2
AlphaVegas asked on 25 Feb 2008, 07:50 PM
Are there still plans to allow opening a User Control inside a RAD Window?

This thread from Feb. 2007 states that it is in the plans;
http://www.telerik.com/community/forums/thread/b311D-gmddt.aspx

However, I still receive the 'This type of page is not served.' exception.

Thanks,
A.

5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Feb 2008, 04:45 PM
Hi Alistair,

We considered that idea in our internal meetings, however we decided not to implement such feature because it is out of the scope of the control. The idea behind the RadWindow control is to replace the standard browser's window and to basically be a container which displays a content page different from the parent one.

The functionality that you need - to show a user control in a container can be achieved by either using RadDock or RadToolTip - we invite you to check them and choose the one that best suits your requirements.

If these two controls don't meet your requirements, can you please provide additional information on your exact scenario? It will help us provide you with the most appropriate solution.



Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
neb
Top achievements
Rank 1
answered on 11 Jun 2014, 08:48 PM
is there a way to open a radwindow from inside a user control?
0
Shinu
Top achievements
Rank 2
answered on 12 Jun 2014, 03:45 AM
Hi neb,

Please have a look into the sample code snippet to open a RadWindow inside the UserControl from the parent page.

ASCX:
<telerik:RadWindow ID="RadWindow1" runat="server">
    <ContentTemplate>
        RadWindow inside UserControl Page
    </ContentTemplate>
</telerik:RadWindow>

ASPX:
<uc1:RadWindow ID="UserControl1" runat="server" />
<telerik:RadButton ID="radbtnOpenWin" runat="server" Text="Open Window" OnClick="radbtnOpenWin_Click">
</telerik:RadButton>

C#:
protected void radbtnOpenWin_Click(object sender, EventArgs e)
{
    UserControl control = UserControl1 as UserControl;
    RadWindow window = control.FindControl("RadWindow1") as RadWindow;
    window.VisibleOnPageLoad = true;
}

Please elaborate your requirement if it doesn't help.
Thanks,
Shinu.
0
Phil
Top achievements
Rank 1
answered on 17 May 2019, 05:24 PM
Shinu, this is brilliant!  Thanks!
0
Vessy
Telerik team
answered on 20 May 2019, 12:42 PM
Hi guys,

I will also advise that you take a look at the approach described in the following article demonstrating how to open a RadWindow from the server-side by registering a startup script to the ScriptManager (so the window will be shown only once):
https://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/opening-from-the-server

Namely:
protected void Button1_Click(object sender, EventArgs e)
{
    //business logic goes here
 
    string script = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
}

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Window
Asked by
AlphaVegas
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
neb
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Phil
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or