event on "Scroll Next"

4 posts, 0 answers
  1. Support
    Support avatar
    13 posts
    Member since:
    Feb 2012

    Posted 29 Jun Link to this post


    Hi, I have a RadImageGallery with DisplayAreaMode="LightBox".

    It's possibile have an event when user click on "Scroll Next"?

    Thanks in advanced.
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 29 Jun Link to this post

    Hi,

    You can handle the "OnNavigating" and "OnNavigated" client events in this case.

    Regards,
    Maria Ilieva
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Support
    Support avatar
    13 posts
    Member since:
    Feb 2012

    Posted 30 Jun in reply to Maria Ilieva Link to this post

    Hi, thanks for the reply.

    I had already tried but are not raised these events .

    I have OnNavigating event only when I click on a photo

     

    <script type="text/javascript">
        function navigated(sender, args) {
            alert('OnNavigated');
        }
        function navigating(sender, args) {
            alert('OnNavigating');
        }
    </script>
     
     
     
        <telerik:RadImageGallery RenderMode="Lightweight" runat="server" ID="RadImageGallery1" DisplayAreaMode="LightBox" Width="100%"  >
            <ThumbnailsAreaSettings Height="250px" ThumbnailHeight="50px" ThumbnailWidth="50px" />
            <ClientSettings>
                <ClientEvents OnNavigating="navigating" OnNavigated="navigated" />
            </ClientSettings>
        </telerik:RadImageGallery>

     

    I use the 2016.1.113.40 version

  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 05 Jul Link to this post

    Hello,

    You can attach handler for the client-side onmousedown event of the RadImageGallery wrapping DIV element and if the event target is IMG tag. Here is an example with RadLightBox control and RadImageGallery:
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function handleClick(sender, ev) {
                if (ev.target.tagName == "IMG") {
                    var lightBox = $find('<%= RadLightBox1.ClientID %>');
                    var lightBoxItem = new Telerik.Web.UI.LightBoxItem;
                   
                }
            }
        </script>
    </telerik:RadCodeBlock>
     
    <telerik:RadImageGallery runat="server" ID="RadImageGallery1" Width="500px" ImagesFolderPath="Images" DisplayAreaMode="Image" onmousedown="handleClick(this, event);">
        <ThumbnailsAreaSettings Mode="ImageSliderPreview" />
    </telerik:RadImageGallery>
     
    <telerik:RadLightBox runat="server" ID="RadLightBox1"></telerik:RadLightBox>


    Regards,
    Maria Ilieva
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top