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

Simple DataSource not working in Diagram (does work in e.g. Grid)

3 Answers 105 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Itai
Top achievements
Rank 1
Itai asked on 09 Apr 2016, 04:05 PM

I have made this very simple example which refuses to work: http://dojo.telerik.com/OtIhA

I keep getting "Uncaught TypeError: Cannot read property 'toLowerCase' of undefined". 

Curiously, changing 'kendoDiagram' to 'kendoGrid' works perfectly. So why does this data source work with Grid but not Diagram, and how can I get it to work? 

3 Answers, 1 is accepted

Sort by
0
Itai
Top achievements
Rank 1
answered on 09 Apr 2016, 06:31 PM

Well, apparently when providing "dataSource", you must provide connections, and they must be given in the form of a data source as well. Changing `connections` to `connectionsDataSource` solved the problem. 

 

Still, a better error message and a mention in the documentation about this behavior would have been nice. 

0
Accepted
Daniel
Telerik team
answered on 13 Apr 2016, 07:24 AM
Hello,

Indeed, the dataSource should be used with the connectionDataSource. The connections option should be used with the shapes option to statically set the elements with the options. Still, an error should not be thrown. We will fix it for the next internal build.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Daniel
Telerik team
answered on 19 Apr 2016, 11:11 AM
Hello again,

It seems that we cannot reliably avoid the error in this case. The diagram will expect a HierarchicalDataSource if a single dataSource is used and a flat dataSource instance is set in the scenario from the example. We will throw an error with meaningful message instead.

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
Itai
Top achievements
Rank 1
Answers by
Itai
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or