Cannot add elements to diagram when specifying dataSource in options

2 posts, 1 answers
  1. Ralph
    Ralph avatar
    17 posts
    Member since:
    May 2011

    Posted 03 Feb 2015 Link to this post


    I am having an issue when attempting to bind to dataItems when I provide a dataSource in the options of the diagram. I have created a sample in the Dojo that throws the error: "Cannot read property 'toLowerCase' of undefined"
    If I comment out the line that specifies the dataSource in the diagram options then dragging and dropping elements on the diagram works as expected, however I would like to be able to provide the model of my dataItems to the dataSource as this would give me the ability to use the default edit window. Is there a field that is expected on the dataSource configuration that I am not providing?

  2. Answer
    Daniel avatar
    2177 posts

    Posted 05 Feb 2015 Link to this post

    Hello Ralph,

    The diagram expects a HierarchicalDataSource or in the latest version - a flat dataSource and conectionsDataSource. If you wish to use the edit window, then you should update the used version and set the connectionsDataSource as well. Also, in this scenario the diagram requires the new shape items to be synced and the Id to be assigned from the crate operation in order to render the shapes so you will need to implement the transport operations. I updated the example to demonstrate this scenario.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top