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

Unable to open RadWindow

3 Answers 110 Views
Window
This is a migrated thread and some comments may be shown as answers.
DogEars
Top achievements
Rank 2
DogEars asked on 01 May 2009, 12:53 PM
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> 

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 May 2009, 01:11 PM
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.
0
DogEars
Top achievements
Rank 2
answered on 01 May 2009, 01:21 PM
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.
0
Fiko
Telerik team
answered on 01 May 2009, 03:01 PM
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.
Tags
Window
Asked by
DogEars
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
DogEars
Top achievements
Rank 2
Fiko
Telerik team
Share this question
or