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

Convert data item so shape

2 Answers 72 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Itai
Top achievements
Rank 1
Itai asked on 11 Apr 2016, 02:20 PM

Hello

I have the following problem - I need to synchronize a diagram with a search field / combo box, such that both will have the same datasource, and when selecting/searching, the diagram focuses on the correct shape. The problem is, as far as I understand it `diagram.bringIntoView` can only take shape, not the dataItem that is associated with it. 

If I have the shape I can get the shape.dataItem, but in the combo box I only have the data item. Is there a way to ask the diagram "give me the shape for this data item"? Or is the only solution to save every shape in say `visualTemplate`, when it is created? 

 

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 13 Apr 2016, 08:36 AM
Hello,

Currently there isn't a dedicated method for retrieving a shape by dataItem but it can be found by comparing the shapes dataItem to the selected item - example. We will include method(s) for the next release.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Itai
Top achievements
Rank 1
answered on 13 Apr 2016, 08:49 AM
Thank you, this example is very helpful. 
Tags
Diagram
Asked by
Itai
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Itai
Top achievements
Rank 1
Share this question
or