I need to provide a small image gallery (of thumbnails) When a user moves the mouse over a thumbnail, I want to display a larger version of the image in a popup window (all client side) are there any examples anywhere I could use to get me started ?
5 Answers, 1 is accepted
0
Hi mark,
I think that this example can be a good starting point for you:
http://demos.telerik.com/ASPNET/Prometheus/Rotator/Examples/Gallery/DefaultCS.aspx
To extend it and display the non-thumbnail version of the image in a pop-up window, consider intercepting the onclick/onmouseover client event of the images in RadRotator and utilize the window.radopen method of RadWindow.
Best regards,
Sebastian
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I think that this example can be a good starting point for you:
http://demos.telerik.com/ASPNET/Prometheus/Rotator/Examples/Gallery/DefaultCS.aspx
To extend it and display the non-thumbnail version of the image in a pop-up window, consider intercepting the onclick/onmouseover client event of the images in RadRotator and utilize the window.radopen method of RadWindow.
Best regards,
Sebastian
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mww
Top achievements
Rank 1
answered on 01 Dec 2008, 11:54 AM
can i download this project ?
0
Hi mark,
You can find the sample under your RadControls for ASP.NET AJAX installation at the following location:
C:\Program Files\telerik\RadControls for ASPNET AJAX Q3 2008\Live Demos\Rotator\Examples\Gallery
Regards,
Sebastian
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can find the sample under your RadControls for ASP.NET AJAX installation at the following location:
C:\Program Files\telerik\RadControls for ASPNET AJAX Q3 2008\Live Demos\Rotator\Examples\Gallery
Regards,
Sebastian
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mww
Top achievements
Rank 1
answered on 01 Dec 2008, 05:40 PM
Ive looked at the project and modified it to suit my need, what I need now is to be able to get the id of each image thats clicked.
the underlying data has an id column, how can i get that value when i click the image and display the full sized one ?
Ive looked at the e.item.dataitem object, but its always null. Can I place a hidded column somewhere in the template ?
the underlying data has an id column, how can i get that value when i click the image and display the full sized one ?
Ive looked at the e.item.dataitem object, but its always null. Can I place a hidded column somewhere in the template ?
protected
void ShowImage(object sender, RadRotatorEventArgs e)
{
//need to get the id here
0
Hi,
I think you can only get the index of the clicked item (e.Item.Index) on the server. The DataItem is not stored to minimize usage of the ViewState. If you want to have an ID in the rotator template, you can easily do that with a hidden input (like you already suggested):
<input type="hidden" runat="server" id="hiddenID" value='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
Then you should be able to find the input on the client (from the rotator's OnClientItemClicked event) and use its value.
All the best,
Lini
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I think you can only get the index of the clicked item (e.Item.Index) on the server. The DataItem is not stored to minimize usage of the ViewState. If you want to have an ID in the rotator template, you can easily do that with a hidden input (like you already suggested):
<input type="hidden" runat="server" id="hiddenID" value='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
Then you should be able to find the input on the client (from the rotator's OnClientItemClicked event) and use its value.
All the best,
Lini
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.