Invoking an user control which contains a radwindow and a telerik grid

2 posts, 0 answers
  1. Saniya
    Saniya avatar
    2 posts
    Member since:
    Feb 2012

    Posted 14 Feb 2012 Link to this post


    I have an web user control having a radwindow and a radgrid within it. I want to invoke this user control from multiple pages which means I want to show the popup(radwindow) from multiple pages. Could you please guide me how i cn achieve this. Now I am creating an instance of the user control in the calling form and finding the radwindow from the user control.But it is not finding the radwindow from the user control.It is giving null when I am trying to find the radwindow from the user control.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Feb 2012 Link to this post


    Try the following code.
    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
    <uc1:panel1WebUserControl ID="WebUserControl1" runat="server" />
    protected void Button1_Click(object sender, EventArgs e)
          RadWindow RadWindow1=(RadWindow) WebUserControl1.FindControl("RadWindow1");//Accessing RadWindow from UserControl.
          RadWindow1.VisibleOnPageLoad = true;
    <telerik:RadWindowManager Behaviors="Close" ID="rwm" runat="server" >
       <telerik:RadWindow ID="RadWindow1" Title="Save layout" runat="server"  NavigateUrl="~/radgrid/grid.aspx" Modal="true">

Back to Top