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

radwindow open second radwindow

1 Answer 47 Views
Window
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 07 Jun 2012, 06:38 PM
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!

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Jun 2012, 04:23 AM
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.
Tags
Window
Asked by
JJ
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or