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

shape tooltip - ajax

1 Answer 65 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Justin Lee
Top achievements
Rank 1
Justin Lee asked on 12 Jul 2017, 03:12 PM

Hello,

I connected a kendo tooltip to my diagram with a filter of "g".  The tooltip is showing when hovering over a shape. I want the tooltip to be loaded from ajax, so I have added an event handler for requestStart of the tooltip.

However, I cannot seem to access the dataItem of the shape in the requestStart event handler to get the id of the item.  e.target[0] appears to be the shape, but I can't seem to access the dataItem from it.

Let me know if you want any sample code.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetina
Telerik team
answered on 14 Jul 2017, 01:29 PM
Hi Justin,

You should be able to access the shape JavaScript object by following a similar approach to the one used in this sample:
Drag and Drop on Existing Shapes

You can see the code in the DropTarget's drop event handler, where a Shape is obtained using event page coordinates. Once you have a reference to the Shape object, you can get the dataItem. If you have problems with accessing the needed values, you can send me a Dojo, where I can get to the point where you need to fire the request with parameters.

Regards,
Tsvetina
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Diagram
Asked by
Justin Lee
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or