radwindow open second radwindow

2 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 07 Jun 2012 Link to this post

    I used below for my first radwindow pop up

     

     

    this.imgCreateStoreList.Attributes.Add("onclick", "openWinEvents('Events.aspx?Designator=" + desParameter + "&ctProcessId=" + ctProcessId + "&rnd=" + System.Guid.NewGuid() + "'); return false;");

     

    function openWinEvents(parameter) {
               var wnd = $find('<%=RadWindow1.ClientID %>');
               if (wnd != null) {
                   wnd.setUrl("/Builder/" + parameter + "");
                   wnd.setSize(800, 600);
                   wnd.set_modal(true);
                   wnd.set_iconUrl("/img/radwindowicon.gif");
                   wnd.Show();
               }
           }
    On the 1st radwindow pop up, I have a radupload button and want to save the file and open second radwindow for message/report display, I tried lots ways, can't open the second radwindow.

    I suppose to use server side code to open it.

    Tried:
    RadWindow CommPromptWindow = (RadWindow)Page.Master.FindControl("EventsPromptWindow");
      
    CommPromptWindow.VisibleOnPageLoad = true;
    But not work. Please help!
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 Jun 2012 Link to this post

    Hi JJ,

    Following is the sample code I tried to achieve your scenario and it is working for me as expected.

    ASPX:
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
       <Windows>
         <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true">
           <ContentTemplate>
             <telerik:RadButton ID="RadButton1" runat="server" onclick="RadButton1_Click" >
             </telerik:RadButton>
           </ContentTemplate>
         </telerik:RadWindow>
         <telerik:RadWindow ID="RadWindow2" runat="server">
         </telerik:RadWindow>
       </Windows>
    </telerik:RadWindowManager>

    C#:
    protected void Page_Load(object sender, EventArgs e)
      {
        RadButton1.Attributes.Add("onclick", "openWinEvents('Events.aspx?Designator=" + desParameter + "&ctProcessId=" + ctProcessId + "&rnd=" + System.Guid.NewGuid() + "'); return false;");
      }

    JS:
    <script type="text/javascript">
        function openWinEvents(parameter) {
            var wnd = $find('<%=RadWindow2.ClientID %>');
            if (wnd != null) {
                wnd.setUrl("/Builder/" + parameter + "");
                wnd.setSize(800, 600);
                wnd.set_modal(true);
                wnd.set_iconUrl("/img/radwindowicon.gif");
                wnd.Show();
            }
        }
    </script>

    Please elaborate your scenario if it doesn't helps.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top