Hover event and dataitem access

4 posts, 0 answers
  1. Jonatan
    Jonatan avatar
    14 posts
    Member since:
    Feb 2014

    Posted 17 Dec 2014 Link to this post

    I have a couple of challenges regarding the Diagram, which I need to address.

    1: I need to be able to add a class to any shape that I add to the Diagram. How do I do this?

    2: Once the classes are added, I need to add a delegated hover event to the shapes (which should be easy enough with jquery). My challenge in this case is that I need to be able to access the dataItem of the shape which I have added the event to.

    Can anyone help me with this?
  2. Jonatan
    Jonatan avatar
    14 posts
    Member since:
    Feb 2014

    Posted 17 Dec 2014 in reply to Jonatan Link to this post

    I am hoping that this will allow me to make Kendo tooltips on the shapes.

    But if there is a smarter way to make tooltips on the shapes, can someone tell me about it?
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Jonatan
    Jonatan avatar
    14 posts
    Member since:
    Feb 2014

    Posted 18 Dec 2014 Link to this post

    It seems that currently you cannot add a Telerik tooltip to the diagram shapes.

    But I figured out an alternative.

    I used the diagrams Click Event to display a simple floating div at the mouse location on the page. I then make the div fade away when the MouseLeave event is fired.

    This will do until a future release allows me to make use of teleriks tooltips =]
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 19 Dec 2014 Link to this post

    Hello,

    The Diagram elements are not guaranteed to be in the DOM. The widget can switch between SVG, Canvas and VML rendering depending on the browser.
    This requires the diagram to provide "native" mouseenter / mouseleave events. This is something that we plan to do soon.

    Apologies for the caused inconvenience.

    Regards,
    T. Tsonev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready