Convert data item so shape

3 posts, 1 answers
  1. Itai
    Itai avatar
    33 posts
    Member since:
    Feb 2016

    Posted 11 Apr Link to this post

    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. Answer
    Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 13 Apr Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Itai
    Itai avatar
    33 posts
    Member since:
    Feb 2016

    Posted 13 Apr in reply to Daniel Link to this post

    Thank you, this example is very helpful. 
Back to Top