This is a migrated thread and some comments may be shown as answers.
needs two clicks to open radwindow
1 Answer 32 Views
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 16 Mar 2012, 07:22 PM
I need a little help.  I am having a problem opening a radwindow from a parent radwindow.  I have a radwindow that is called from a radgrid.
<CommandItemTemplate>
                               <table width="100%">
                           <tr class="customFont">
                         
                          <td align="left">
                           <asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="openWin('/portals/0/NewSearch.aspx?AuthoringNames='); return false;"  >
                              <img style="border:0px;vertical-align:middle;" alt="" src="/portals/0/Images/add-icon.png" />New Search</asp:LinkButton>                              
                                 
                                    <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="openWin2('/portals/0/NewPublicationList.aspx'); return false;"  >
                              <img style="border:0px;vertical-align:middle;" alt="" src="/portals/0/Images/add-icon.png" />Import PMID List</asp:LinkButton>                              
                                                          
                              
                              <td align="left">
                             </td>
                                                  
                          <td align="right">
                              <asp:LinkButton ID="LinkButton4" runat="server" OnClientClick="refreshGrid(); return false;" >
                              <img style="border:0px;vertical-align:middle;" alt="" src="/portals/0/Images/Refresh.png" /> Refresh</asp:LinkButton>
                                  
                          </td>
                      </tr>
         
           </table>
              </CommandItemTemplate>

The linkbutton calls


function openWin2(url) {
        var oWnd = $find("<%=RadWindow1.ClientID%>");
          var authorNames = document.getElementById('<%=HiddenField1.ClientID%>').value;
          oWnd.setUrl(url + "?AuthoringNames=" + authorNames);
       var oWnd = radopen("/portals/0/NewSearch.aspx?AuthoringNames=" + authorNames, "RadWindow1");
        }
The linkbuton needs two click to call the function.  If I change the function to oWnd.Show that it works on one click but I then can't get the parentwindow from the opened radwindow to open another window.  This line totally freezes in the opened window and will not call the second window
var oWnd2 = parentRadWindowManager.open("/portals/0/QuerySaver.aspx", "RadWindow3");

and this is my originating forms radWindow code

<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" Modal="True"
     runat="server" EnableShadow="true">
     <Windows>
         <telerik:RadWindow ID="RadWindow1" runat="server"  Modal="true" Width="750" Height="600" OnClientClose="OnClientClose" Behaviors="Close,Move"
           ReloadOnShow="true" NavigateUrl="/portals/0/NewSearch.aspx" >
         </telerik:RadWindow>
            <telerik:RadWindow ID="RadWindow2" runat="server"  Modal="true" Width="750" Height="300" OnClientClose="OnClientClose" Behaviors="Close,Move"
           ReloadOnShow="true"  >
         </telerik:RadWindow>
         <telerik:RadWindow ID="RadWindow3"  runat="server" Width="650" Height="480" Modal="true"  NavigateUrl="/portals/0/QuerySaver.aspx" >
         </telerik:RadWindow>
         </Windows>
 </telerik:RadWindowManager>



Is this because I have my link button on a radGrid?
I've tried to totally follow your demos but none have it starting from a radgrid.

Thanks

Bill

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 20 Mar 2012, 12:21 PM
Hi,

Please start by examining this help article on the different ways to open a RadWindow. Directly calling radopen() is sufficient, otherwise you should call its show() method and remove the radopen() line.

I also advise that you examine this help article on opening a RadWindow from another RadWindow. Please note the timeout.

I am attaching here a simple page that works correctly (see here), opens the first RadWindow from a link button in a grid (which is not relevant, actually) and the second is opened via code from within the first but its parent is the main page. Please examine it and try to incorporate this functionality in your project.


All the best,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
William
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or