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

Cannot add elements to diagram when specifying dataSource in options

1 Answer 112 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Ralph
Top achievements
Rank 1
Ralph asked on 03 Feb 2015, 03:24 PM
Hello,

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"
http://dojo.telerik.com/iMoja/3
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?

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 05 Feb 2015, 12:03 PM
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.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Diagram
Asked by
Ralph
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or