Disable click for mouseover tooltip

3 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 23 Oct 2009 Link to this post

    Hi

    Can you help me refine the action for the tooltip working on a grid item? 

    I want the tooltip item to load and display on mouseover (which it does now).
    However if the visitor clicks the item,  the browser transfers the visitor to the home page.   
    The declaration is like this :
    <ItemTemplate> 
    <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("Name") %>'>  
    </asp:HyperLink> 
    </ItemTemplate> 

    How can I disable any click action? Or can I make the 'hand' show on mouseover without having a url at all?
    It is inevitable that some people will click and get confused/lost...

    Thanks

    Clive
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 28 Oct 2009 Link to this post

    Hi Clive Hoggar,
    Straight to your questions:
    1. You can cancel the click on the link button the following way:
      <asp:HyperLink ID="targetControl" runat="server" onclick="return false;" NavigateUrl="#" Text="Name"
      </asp:HyperLink>
    2. You can set the cursor for the element with CSS:
      <asp:HyperLink style="cursor:pointer;" ID="targetControl" runat="server" Text="Name"
      </asp:HyperLink>
    Regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 22 Nov 2009 Link to this post

    Thanks!
Back to Top