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

Display images dynamically in RadWindow

1 Answer 191 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rob Venable
Top achievements
Rank 1
Rob Venable asked on 05 Feb 2010, 01:43 PM
Hi,
I have a repeater that shows product information including a picture for each product. If you click on the picture, it will display an enlarged image in a RadWindow. I just need to know how to pass an ID to the RadWindowManager to display the enlarged image of the picture that was clicked. I'm just harcoding an image right now but I need to make it dynamic.

Here is my code:
<telerik:RadCodeBlock id="RadCodeBlock1" runat="server">  
   <script type="text/javascript">     
     function ShowDialog()     
     {     
         window.radopen(null, "ShowImage");     
     }     
   </script>    
</telerik:RadCodeBlock> 
    
<telerik:RadWindowManager id="RadWindowManager1" style="z-index:7001" runat="server">  
  <Windows> 
    <telerik:RadWindow id="ShowImage" width="400" height="400" modal="true" navigateurl="imgPreview.aspx?img=~/images/Products/image1_large.png" runat="server"></telerik:RadWindow> 
  </Windows> 
</telerik:RadWindowManager>  

and here is the repeater...I'm just showing the image to keep it short.
<asp:Repeater ID="rptProducts" runat="server">  
    <ItemTemplate> 
    
      <div class="divProduct">  
        <div class="divImage">  
          <asp:Label ID="lblProductNumber" runat="server" Text=""></asp:Label><br /> 
          <asp:HyperLink ID="lnkImage" OnClick="ShowDialog()" runat="server">  
              <asp:Image ID="imgProduct" runat="server" />               
          </asp:HyperLink>   
        </div> 
     </ItemTemplate> 
</asp:Repeater> 
 

How can I pass information to the ShowDialog dynamically based on the image that was clicked?
Thanks

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 10 Feb 2010, 01:54 PM
Hi Rob,

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
Please note however, that this issue is not directly related to the RadWindow control but is a general programming task.


Best wishes,
Georgi Tunev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Window
Asked by
Rob Venable
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or