image gallery

6 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 01 Dec 2008 Link to this post

    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 ?
  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 01 Dec 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 01 Dec 2008 Link to this post

    can i download this project ?
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 01 Dec 2008 Link to this post

    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.
  6. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 01 Dec 2008 Link to this post

    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 ?

    protected

     

    void ShowImage(object sender, RadRotatorEventArgs e)

     

    {
        //need to get the id here

  7. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 03 Dec 2008 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017