Unable to open RadWindow

4 posts, 0 answers
  1. DogEars
    DogEars avatar
    79 posts
    Member since:
    Jun 2007

    Posted 01 May 2009 Link to this post

    Not sure what I'm doing wrong here, any assistance would be appreciated.

    <asp:FormView ID="NPProfile" runat="server"
     
        <ItemTemplate> 
            <table> 
                <tr> 
                    <td> 
                        <href="#" onclick='function() { ShowGridEditForm(userID); };'><asp:Image ID="NPPhoto" runat="Server" /></a
                    </td> 
                </tr> 
                <tr> 
                    <td style="color: #60798F; font-family: Arial, Verdana; font-size: 12px;"
                        <%#Eval("FullName")%> 
                    </td> 
                </tr> 
                <tr> 
                    <td style="color: #60798F; font-family: Arial, Verdana; font-size: 12px;"
                        <%#Eval("PrimarySpecialty")%> 
                    </td> 
                </tr> 
            </table> 
            <div style="margin: 0 0 10px 0"
                &nbsp;</div> 
        </ItemTemplate> 
    </asp:FormView> 
     
                    <script type="text/javascript"
                           function ShowGridEditForm(userID) { 
                               window.radopen("../npdetails.aspx?userid=" + <%=session("fnpID") %>, "GridSelectDialog"); 
                               return false; 
                           } 
               
                    </script> 
                         
                       
     
                    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Default"
                        <Windows> 
                            <telerik:RadWindow ID="GridSelectDialog" runat="server" Height="450px" Width="600px" 
                                ReloadOnShow="true" Modal="true" Skin="Web20" Behaviors="Close" /> 
                        </Windows> 
                    </telerik:RadWindowManager> 

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 May 2009 Link to this post

    Hi DogEars,

    I believe that the following KB article will be of help:
    http://www.telerik.com/support/kb/aspnet-ajax/window/binding-to-a-grid-opening-windows-by-clicking-grid-items.aspx



    Best wishes,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DogEars
    DogEars avatar
    79 posts
    Member since:
    Jun 2007

    Posted 01 May 2009 Link to this post

    Hi Georgi,

    I actually pulled my javascript code from a working implementation of clicking on a grid and showing the RadWindow, so no worries there.

    What I'm trying to do now is just have the RadWindow open up using a normal anchor tag link.


    Thanks.
  4. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 01 May 2009 Link to this post

    Hello DogEars,

    The provided information is not enough for me to understand the expected behavior, but I guess that the session("fnpID") server function returns the string value and you need dynamically built URL. However in you code you declared a function in the onclick event but this function is never being called. The followings code should work in your case :


        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Default"
            <Windows> 
                <telerik:RadWindow ID="GridSelectDialog" runat="server" Height="450px" Width="600px" 
                    ReloadOnShow="true" Modal="true" Skin="Web20" Behaviors="Close" /> 
            </Windows> 
        </telerik:RadWindowManager> 
        <href="#" onclick='ShowGridEditForm("userID"); return false;'
            <asp:Image ID="NPPhoto" runat="Server" /></a
     
        <script type="text/javascript"
            function ShowGridEditForm(userID) 
            { 
                window.radopen("../npdetails.aspx?userid=" + '<%= session("fnpID") %>', "GridSelectDialog"); 
                return false; 
            }        
        </script> 


    I hope this helps. If you still experience problems however, please open a support ticket and send us a small sample project that we could run and examine.
     

    Kind regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top