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

event on "Scroll Next"

3 Answers 78 Views
ImageGallery
This is a migrated thread and some comments may be shown as answers.
Support
Top achievements
Rank 2
Support asked on 29 Jun 2016, 02:35 PM

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

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

Thanks in advanced.

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 29 Jun 2016, 03:39 PM
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.
0
Support
Top achievements
Rank 2
answered on 30 Jun 2016, 07:21 AM

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

0
Maria Ilieva
Telerik team
answered on 05 Jul 2016, 08:45 AM
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.
Tags
ImageGallery
Asked by
Support
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Support
Top achievements
Rank 2
Share this question
or