Disable Click Event for specific item in RadRotator

2 posts, 1 answers
  1. Michael Schneiders
    Michael Schneiders avatar
    1 posts
    Member since:
    Feb 2009

    Posted 19 Jul 2011 Link to this post

    We are using Radrotator as follows:

    <telerik:RadRotator ID="RadRotator_Slider" PauseOnMouseOver="false" runat="server" Skin="cms" EnableEmbeddedSkins="false">




    <asp:Image ID="Image" runat="server" style="cursor:pointer" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Image") %>' AlternateText="" />





    When Item is clicked, the following event is called and a redirection to
    specified URL is executed:


    Protected Sub RadRotator_Slider_ItemClick(o As Object, e As RadRotatorEventArgs) Handles RadRotator_Slider.ItemClick

    Dim dt As DataTable = Session("DataSource")

    Dim frame As RadRotatorItem = e.Item

    Dim index As Integer = frame.Index

    Dim Link As String = dt.Rows(index).Item("LinkAdress")

    If Link <> "" Then Response.Redirect(Link)

    End Sub

    For some specific items, there is no URL. For those items, I would like to disable the
    itemclick event and if possible, I would also like to change the cursor style when hovering
    over the image back to normal. As a result, no postback action should be executed on items without url.

    Is that possible?

  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Jul 2011 Link to this post

    Hello Michael,

    You can attach OnClientItemClicking and cancel the event based on the item.
    function OnClientItemClicking(sender, args)
              //Checking for the item and cancel the event

Back to Top